Closed
Description
Here's an example of a service definition that fails in kitgen:
package profilesvc
import "context"
type Service interface {
PostProfile(ctx context.Context, p Profile) error
}
type Profile struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
// fails because of loosely typed field with interface{}
Neighbors map[string]interface{} `json:"neighbors,omitempty"`
}
type Address struct {
ID string `json:"id"`
Location string `json:"location,omitempty"`
}
Error message:
examining input file "./in.go": found 7 interfaces, expecting exactly 1
Activity