Skip to content

solved#1

Open
IvanChumakov wants to merge 1 commit into
mainfrom
task1
Open

solved#1
IvanChumakov wants to merge 1 commit into
mainfrom
task1

Conversation

@IvanChumakov

Copy link
Copy Markdown
Owner

No description provided.

Comment thread task1/book.go
@@ -0,0 +1,36 @@
package main

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У вас все свалено в один пакет. Надо разделить по разным пакетам. Например, книга, бибилиотека, хранилище

Comment thread task1/storages.go
@@ -0,0 +1,52 @@
package main

type Storage interface {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Инитерфейс обычно опредлеяют там, где он используется. У вас он определен там, где реализуется.

Comment thread task1/storages.go
AddBook(book *Book)
}

type SliceStorage struct {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо разделить реализации хранилища на слайсе и на мапе.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants