Exemple #1
0
func (self *BookService) GetBooksByAuthor(authorID int) []library.Book {
	books, err := repositories.GetBookRepository().GetBooksByAuthor(authorID)
	if err != nil {
		log.Println(err)
	}

	return books
}
Exemple #2
0
func (self *BookService) GetAllBooks() []library.Book {
	books, err := repositories.GetBookRepository().GetAllBooks()
	if err != nil {
		log.Println(err)
	}

	return books
}