Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated code uses interface{} instead of any #4039

Open
2 tasks done
willfaught opened this issue Apr 30, 2024 · 0 comments
Open
2 tasks done

Generated code uses interface{} instead of any #4039

willfaught opened this issue Apr 30, 2024 · 0 comments

Comments

@willfaught
Copy link
Contributor

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

Generated code in ent/channelreview/channelreview.go:

 // UnmarshalGQL implements graphql.Unmarshaler interface.
func (e *Language) UnmarshalGQL(val interface{}) error {
       str, ok := val.(string)
       if !ok {
               return fmt.Errorf("enum %T must be a string", val)
// ...

Expected Behavior 馃

Use any instead.

Steps to Reproduce 馃暪

Steps:

  1. Generate ent/foo/foo.go file.

Your Environment 馃寧

Tech Version
Go 1go version go1.22.2 darwin/arm64
Ent v0.13.1
Database PG
Driver https://github.com/lib/pq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant