enumer
enumer copied to clipboard
Refactor code fix deprecations and format
fixing ioutil deprecations and format source code
there are still two deprecations that I have no idea how to fix properly:
perhaps by using github.com/iancoleman/strcase solve some of the issues
stringer.go:249:9: SA1019: packages.LoadSyntax is deprecated: LoadSyntax exists for historical compatibility and should not be used. Please directly specify the needed fields using the Need values. (staticcheck)
Mode: packages.LoadSyntax,
^
stringer.go:355:11: SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead. (staticcheck)
return strings.Title(s)
^
stringer.go:359:20: SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead. (staticcheck)
title := []rune(strings.Title(s))
^
conflicts solved