-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strange symbols in generated code #3413
Comments
func TypeIdentifier(t types.Type) string {
res := ""
for {
switch it := code.Unalias(t).(type) {
case *types.Pointer:
t.Underlying()
res += "ᚖ"
t = it.Elem()
case *types.Slice:
res += "ᚕ"
t = it.Elem()
case *types.Named:
res += pkgReplacer.Replace(it.Obj().Pkg().Path())
res += "ᚐ"
res += it.Obj().Name()
return res
case *types.Basic:
res += it.Name()
return res
case *types.Map:
res += "map"
return res
case *types.Interface:
res += "interface"
return res
default:
panic(fmt.Errorf("unexpected type %T", it))
}
}
} |
@vtolstov Is this causing an issue or is this just a style issue? |
mostly this is style issue and i don't understand why we need to use such symbols (also my ci warns about non ascii symbols in code) |
Could replace the symbols in the TypeIdentifier here with words e.g.
there is also gqlgen/codegen/templates/templates.go Lines 703 to 709 in e92956a
but not sure what to propose as replacements here |
may be this is time to change this? |
unmarshalN__DirectiveLocation2ᚕstringᚄ
in generated file i can see strange symbols, does it possible to generate code only with standard symbols ?
my schema:
The text was updated successfully, but these errors were encountered: