package models
type Article struct {
ID int `json:"id"`
Title string `json:"title"`
Authors []*Author `json:"authors"`
}
type Author struct {
ID int `json:"id"`
FullName string `json:"fullName"`
}
I get an error when trying to generate dataloaders:
go run github.com/vektah/dataloaden AuthorLoader int *git.rn/gm/service-articles/internal/models.Author
unable to gofmt: /home/pioneer/sources/gm/service-articles-go/internal/dataloaders/authorloader_gen.go:6:1: expected 'IDENT', found 'import'
exit status 2
I have simple structs:
I get an error when trying to generate dataloaders:
What I'm doing wrong?