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
{{ message }}
This repository was archived by the owner on Jul 31, 2022. It is now read-only.
func examples() []string {
field := os.Getenv("FIELD")
if field == "" {
field = "foo"
}
return []string{field}
}
results in:
variable 'field' is only used in the if-statement (example.go:2:2); consider using short syntax (ifshort)
field := t.Field
^
This is the shortest example I could boil down to, but found the issue using field as a map key, and in other ways in the return. Not sure if these are all the same issue, happy to provide more examples.