Skip to content
/ mapper Public
forked from PennState/mapper

Maps Go names to alternative formats

License

Notifications You must be signed in to change notification settings

selesy/mapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mapper

The mapper project provides a name mapper that’s compatible with The Go language conventions, where either Pascal Case or Camel Case are recommended. This mapper can perform transalation to and from the following formats:

With this mapper, the parser isn’t dependent upon the input format so you can pass any of above four styles into the function.

When specifying the output format of the mapper, be aware that both the Snake Case and Kebob Case mappers can be configured to generate upper-case or lower-case characters (yielding six output formats).

Also note that one caveat to Go’s recommendations is that acrynyms should be left capitalized. This complicates the mapping process a bit when mapping back to `Go compatible names.

Benchmarks

Iterative loop: 1564 ns/op (prefix and infix acronyms disabled) State machine:

About

Maps Go names to alternative formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%