You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package service
import "context"
type Cluster struct {
Name string
URL string
}
// @microgen middleware, logging, main, http
type StringService interface {
// @http-method GET
ListCluster(ctx context.Context) (cluster []*Cluster, err error)
CreateCluster(ctx context.Context, cluster *Cluster) (err error)
GetCluster(ctx context.Context, name string) (cluster *Cluster, err error)
}
And generate the code with microgen service.go, I get code that doesn't compile:
go build .
# test/foo/middleware
../../middleware/logging.go:27:69: undefined: Cluster
../../middleware/logging.go:38:68: undefined: Cluster
../../middleware/logging.go:49:79: undefined: Cluster
../../middleware/logging.go:63:14: undefined: Cluster
# test/foo/transport/converter/http
../../transport/converter/http/exchange_converters.go:64:2: req declared and not used
This is due to some changes that were done in the past, in particular Cluster is missing the right package. I wanted to fix those and actually it wouldn't be so complicated I guess, I could probably submit a PR. I wonder though how we can avoid this from happening again with an adequate test suite, like mentioned in #56 . Any ideas?
The text was updated successfully, but these errors were encountered:
If I use the following
service.go
file:And generate the code with
microgen service.go
, I get code that doesn't compile:This is due to some changes that were done in the past, in particular
Cluster
is missing the right package. I wanted to fix those and actually it wouldn't be so complicated I guess, I could probably submit a PR. I wonder though how we can avoid this from happening again with an adequate test suite, like mentioned in #56 . Any ideas?The text was updated successfully, but these errors were encountered: