mirror of
https://github.com/Neur0toxine/demo-web-service-go.git
synced 2025-02-13 03:39:24 +03:00
20 lines
394 B
Go
20 lines
394 B
Go
|
package repository
|
||
|
|
||
|
import (
|
||
|
"github.com/Neur0toxine/demo-web-service-go/data/model"
|
||
|
"github.com/brianvoe/gofakeit/v6"
|
||
|
)
|
||
|
|
||
|
func Authors() (authors []model.Author) {
|
||
|
authors = make([]model.Author, 10)
|
||
|
for i := 0; i < 10; i++ {
|
||
|
authors[i] = model.Author{
|
||
|
ID: uint64(i),
|
||
|
FirstName: gofakeit.FirstName(),
|
||
|
LastName: gofakeit.LastName(),
|
||
|
Books: Books(),
|
||
|
}
|
||
|
}
|
||
|
return
|
||
|
}
|