update vendor & fix upload file url & fix judge file type

This commit is contained in:
deepzz0
2018-01-06 23:24:27 +08:00
parent badc62e3f0
commit 3245c0e0d3
165 changed files with 3788 additions and 517 deletions

View File

@@ -67,10 +67,20 @@ type LogOption struct {
Mails Emailer // 告警邮件
}
func osSep() string {
var sep string
if os.IsPathSeparator('\\') {
sep = "\\"
} else {
sep = "/"
}
return sep
}
// 新建日志打印器
func New(option LogOption) *Logger {
wd, _ := os.Getwd()
index := strings.LastIndex(wd, "/")
index := strings.LastIndex(wd, osSep())
logger := &Logger{
obj: wd[index+1:],
out: option.Out,