Skip to content

Commit 1627c7d

Browse files
committed
Clean code
1 parent 96e0b51 commit 1627c7d

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

08-automated_tests/internal/storage/csv/store_repository.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import (
1212
type storeRepo struct {
1313
}
1414

15-
// NewRepository initialize csv repository
15+
// NewCSVStoreRepo initialize csv repository
1616
func NewCSVStoreRepo() beerscli.StoreRepo {
1717
return &storeRepo{}
1818
}
1919

20-
// GetBeers fetch beers data from csv
20+
// GetStores fetch stores data from csv
2121
func (r *storeRepo) GetStores() ([]beerscli.Store, error) {
2222
f, _ := os.Open("08-automated_tests/data/stores.csv")
2323
reader := bufio.NewReader(f)

08-automated_tests/internal/storage/mock/store.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,3 @@ func (m *MockStoreRepo) GetStores() ([]beerscli.Store, error) {
1414
res := args.Get(0)
1515
return res.([]beerscli.Store), args.Error(1)
1616
}
17-
18-
//func (m *MockStoreRepo) FetchStoreByID(ID int) (beerscli.Store, error) {
19-
// args := m.Called(ID)
20-
// res := args.Get(0)
21-
// return res.(beerscli.Store), args.Error(1)
22-
//}

08-automated_tests/internal/store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ type Store struct {
77
Country string `json:"country"`
88
}
99

10-
// StoreRepo definiton of methods to access a data beer
10+
// StoreRepo definiton of methods to access stores data
1111
type StoreRepo interface {
1212
GetStores() ([]Store, error)
1313
}
1414

15-
// NewStore initialize struct beer
15+
// NewStore initialize struct Store
1616
func NewStore(storeID int, name, country string) (b Store) {
1717
b = Store{
1818
StoreID: storeID,

0 commit comments

Comments
 (0)