gid is a small lib to convert a string to a valid Go identifier.
- checking for keywords and predeclared identifiers
- checking for initialisms
import "github.com/MartyHub/gid"
tok := gid.Default()
tok.ExportID("id") // ID
tok.ExportID("my_id") // MyID
tok.ExportID("json_id") // JSONId
tok.UnexportID("ID") // id
tok.UnexportID("my_id") // myID
tok.UnexportID("json_id") // jsonID