Gommon is a golang common package that provides several methods to use in your projects.
Gommon has several sub-package :
- htblockchain
- htcolog ( colorful console logger )
- htenvier ( ENV methods )
- htregex ( work with regex )
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("usernaame@gmail.com") // output : use***@gm**.com
gommon.MakeMaskEmail("usernaame@gmail.com") // output : use***@gmail.com
gommon.MakeMaskUsername("myusername") // output : my***me
example :
htregex.IsEmail("username@gmail.com")