gommon
is a golang common package that provides several methods to use in your projects.
gommon
has several sub-package :
- htcolog ( colorful console logger )
- htenvier ( ENV methods )
example :
htcolog.DoGreen("prints a green string")
htcolog.MakeRed("returns a red string")
example :
htenvier.ENV("DB_NAME")
Format email , username and ...
example :
gommon.MakeMaskEmailAndDomain("[email protected]") // output : use***@gm**.com
gommon.MakeMaskEmail("[email protected]") // output : use***@gmail.com
gommon.MakeMaskUsername("myusername") // output : my***me
gommon.IsEmail("[email protected]")