leitiannet

Results 2 issues of leitiannet

https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/07.4.md ![image](https://user-images.githubusercontent.com/12744798/26884876-71c5503e-4bd3-11e7-9174-e106ef92999e.png) 疑问1、New()与ParseFiles()配合可以这样使用吗? 疑问2、ParseFiles()可以接受nil? /* // 1.tmpl template1:{{.}} // 2.tmpl template2:{{.}} */ package main import ( "fmt" "bytes" "text/template" ) func main() { t := template.New("test") t.ParseFiles("1.tmpl", "2.tmpl") buffer :=...

dtm支持将数据存储到集群版Redis中,通过指定前缀将所有数据存储到一个slot。但代码中通过redis.NewClient创建Redis客户端实例貌似有问题。 集群版Redis插入测试key 192.168.32.47:7000> set {dtm}_k1 dtm OK 192.168.32.47:7000> get {dtm}_k1 "dtm" 测试代码 ``` package main import ( "context" "fmt" "time" "github.com/go-redis/redis" ) var ( ctx = context.Background() addrs = []string{"192.168.32.45:7000",...