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

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

	return books
}