Library/models/authors_list.go

11 lines
160 B
Go

package models
func ListAuthors() (authors []Author, err error) {
err = x.Find(&authors)
if err != nil {
return []Author{}, err
}
return authors, nil
}