Skip to content

MartyHub/gid

Repository files navigation

gid

gid is a small lib to convert a string to a valid Go identifier.

build Go Report Card

TLDR;

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

About

Small lib to convert a string to a valid Go identifier

Topics

Resources

License

Stars

Watchers

Forks

Contributors