golang sugar library
import "github.com/deoops-net/easy"
- RootDir() string returns the absolute root directory
fmt.Println(RootDir())
import "github.com/deoops-net/easy/hash"
- MD5(string) string
fmt.Println(hash.MD5("foo"))
based on official mongodb driver, for using mongo easily
import db "github.com/deoops-net/easy/db/mongo"
- db.IniConn(db.MongoConf) nil
- db.Table(string) *mongo.Collection
conf := db.MongoConf{}
db.IniConn(conf)
db.Table("users").FindOne(context.Background(), bson.M{})