We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bd1108 commit eeed5d4Copy full SHA for eeed5d4
internal/gen.go
@@ -219,9 +219,9 @@ func methodName(name string) string {
219
var pyIdentPattern = regexp.MustCompile("[^a-zA-Z0-9_]+")
220
221
func pyEnumValueName(value string) string {
222
- id := strings.Replace(value, "-", "_", -1)
223
- id = strings.Replace(id, ":", "_", -1)
224
- id = strings.Replace(id, "/", "_", -1)
+ id := strings.ReplaceAll(value, "-", "_")
+ id = strings.ReplaceAll(id, ":", "_")
+ id = strings.ReplaceAll(id, "/", "_")
225
id = pyIdentPattern.ReplaceAllString(id, "")
226
return strings.ToUpper(id)
227
}
0 commit comments