Skip to content

Commit

Permalink
[INTERFACES] fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
PatAkil committed Nov 1, 2024
1 parent 2b4adff commit eaa540b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go-training.slide
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ Tasks:
Remove(key string) error
}

TIP: Create a constructor function ans let your IDE do the magic
TIP: Create a constructor function and let your IDE do the magic
TIP: Use a map as in-memory datastore

Peek: examples/interfaces
Expand Down
4 changes: 2 additions & 2 deletions solutions/interfaces/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type Patient struct {
Name string
}

type Datastorer interface {
type DataStorer interface {
Put(key string, patient any) error
Get(key string) (any, bool, error)
Remove(key string) error
Expand All @@ -15,7 +15,7 @@ type inMemoryPatientDatastore struct {
data map[string]Patient
}

func New() Datastorer {
func New() DataStorer {
return &inMemoryPatientDatastore{
data: map[string]Patient{},
}
Expand Down

0 comments on commit eaa540b

Please sign in to comment.