-pkg process the whole package instead of just the given file -snake_case use snake_case names instead of CamelCase by default -stubs only generate stubs for marshaler/unmarshaler funcs 其中有几个选项需要注意: -lower_camel_case:将结构体字段field首字母改为小写。如Name=>name。 -build_tags st...
strcase是一个go包,用于将字符串大小写转换为各种大小写(例如,或),以查看下面的完整转换表。 例子 s := "AnyKind of_string" 功能 结果 ToSnake(s) any_kind_of_string ToSnakeWithIgnore(s, '.') any_kind.of_string ToScreamingSnake(s) ANY_KIND_OF_STRING ToKebab(s) any-kind-of-string ToScr...
strcase is a go package for converting string case to various cases (e.g. snake case or camel case) to see the full conversion table below. Example s := "AnyKind of_string" FunctionResult ToSnake(s) any_kind_of_string ToSnakeWithIgnore(s, '.') any_kind.of_string ToScreamingSnake(...
of the output -pkg process the whole package instead of just the given file -snake_case use snake_case names instead of CamelCase by default -lower_camel_case use lowerCamelCase instead of CamelCase by default -stubs only generate stubs for marshaler/unmarshaler funcs -disallow_unknown_fields...
# support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower` json: camel yaml: camel xml: camel bson: camel avro: snake mapstructure: kebab testpackage: # regexp pattern to skip files skip-regexp: (export|internal)...
case: # use the struct field name to check the name of the struct tag use-field-name: true rules: # any struct tag type can be used. # support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower` json:...
gobeam/Stringy - String manipulation library to convert string to camel case, snake case, kebab case / slugify etc. strcase - Case-insensitive implementation of the standard library's strings/bytes packages. strutil - String utilities. sttr - cross-platform, cli app to perform various operations...
specify the filename of the output -pkg process the whole package instead of just the given file -snake_case use snake_case names instead of CamelCase by default -stubs only generate stubs for marshaler/unmarshaler funcs 1. 2. 3.
case: # use the struct field name to check the name of the struct tag use-field-name: true rules: # any struct tag type can be used. # support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower` json:...
func main() { // Javascript code sourceCode := []byte(` const camelCaseConst = 1; const SCREAMING_SNAKE_CASE_CONST = 2; const lower_snake_case_const = 3;`) // Query with predicates screamingSnakeCasePattern := `( (identifier) @constant (#match? @constant "^[A-Z][A-Z_]+") ...