日志收集、查询、分析:logstash,kibana,elasticsearch
分布式测试框架:locust
CI: jenkins
/* | |
由于float精度的问题。在现实世界中遇到下面的问题。 | |
``` | |
f := 4.02 | |
i := int(f * 100.0) | |
fmt.Println("i = ", i) | |
``` | |
> i = 401 | |
*/ |
package forms | |
import "github.com/gorilla/schema" | |
import "github.com/go-validator/validator" | |
var decoder = schema.NewDecoder() | |
func Validate( | |
dst interface{}, | |
values map[string][]string) (bool, map[string][]error) { |
import ( | |
"bytes" | |
"crypto/tls" | |
"crypto/x509" | |
"io/ioutil" | |
"net/http" | |
) | |
wechatCertPath = "/path/to/wechat/cert.pem" | |
wechatKeyPath = "/path/to/wechat/key.pem" |
import fcntl | |
import time | |
import sys | |
lock = file('singleapp.lock', "w+") | |
try: | |
fcntl.lockf(lock, fcntl.LOCK_EX|fcntl.LOCK_NB) | |
except Exception, e: | |
print "kill me before start again" |