- cipher
- error: print and trace
- reflect: some useful reflect gadgets
- slice
- func In(item interface{}, slice interface{}) bool
- python like format
import "github.com/ssst0n3/awesome_libs/awesome_error"
func example() {
awesome_error.CheckError(errors.New("test"))
}
import (
"errors"
"github.com/ssst0n3/awesome_libs/log/logger"
"os"
)
func example() {
a := GetAwesomeError(logger.InitLogger("my-logger", os.Stdout), true)
a.CheckErr(errors.New("apple"))
}
There's a CommonCipher already inited for you. It's key read from SecretDir/awesome_libs_cipher_common.
import "github.com/ssst0n3/awesome_libs/cipher"
func any() {
...
enc, err := cipher.CommonCipher.Encrypt(pt)
}
import "github.com/ssst0n3/awesome_libs"
func Format() {
awesome_libs.Format("Hello {.name}", awesome_libs.Dict{
"name": "awesome",
})
}