02 2022 档案
摘要:package uiltsimport ( "bytes" "crypto/aes" "crypto/cipher" "encoding/base64" "fmt" "strconv" "strings")const ( sKey = "chexiongdisdwa11" ivParameter =
阅读全文
摘要:var Cpt *captcha.Captcha func init() { store := cache.NewMemoryCache() Cpt = captcha.NewWithFilter("/captcha/", store) //一定要写在构造函数里面,要不然第一次打开页面有可能是X C
阅读全文
摘要:beego.SetStaticPath("/static", "static") beego.SetStaticPath("/images", "static/img") beego.SetStaticPath("/css", "static/css") beego.SetStaticPath("/
阅读全文
摘要:import ( "fmt" "os" "path/filepath" "path" ) files := "E:\\data\\test.txt" paths, fileName := filepath.Split(files) fmt.Println(paths, fileName) //获取路
阅读全文
摘要:package main import ( "fmt" "gopkg.in/ini.v1" "log" "time" ) func main() { cfg, err := ini.Load("config.ini") getErr("load config", err) // 遍历所有的secti
阅读全文
摘要:package main import ( "bytes" "encoding/json" "errors" "fmt" "github.com/garyburd/redigo/redis" "time" ) type RedisPool struct { pool *redis.Pool } fu
阅读全文