Open scriptnull opened 3 months ago
I had one model for which I didn't implement the eywa.Model interface. So running go generate ./... resulted in
eywa.Model
go generate ./...
struct type Deployment does not implement eywa.Model interface, skipping...
But at the same time, a file that leads to a compile error is added to the package.
// generated by eywa. DO NOT EDIT. Any changes will be overwritten. package model import ( "github.com/imperfect-fourth/eywa" )
Error is
$ go run main.go model/eywa_fields.go:5:2: "github.com/imperfect-fourth/eywa" imported and not used
So let us avoid writing this file if there is no model implementing the interface.
I had one model for which I didn't implement the
eywa.Model
interface. So runninggo generate ./...
resulted inBut at the same time, a file that leads to a compile error is added to the package.
Error is
So let us avoid writing this file if there is no model implementing the interface.