This commit is contained in:
hoteas 2017-11-14 10:27:09 +00:00
parent 3ff1338b97
commit f4f4d4b83d
3 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package hotime
const ( const (
LOG_FMT = 0 LOG_FMT = 0
LOG_NIL = 1 LOG_NIL = 1
LOG_FILE=2
) )
//锁关键字 //锁关键字

View File

@ -31,6 +31,9 @@ func(this *Error)SetError(err error,loglevel ...int){
if lev==LOG_FMT{ if lev==LOG_FMT{
fmt.Println(err) fmt.Println(err)
} }
if lev==LOG_FILE{
fmt.Println(err)
}
this.err=err this.err=err
return nil return nil
}) })

View File

@ -269,7 +269,7 @@ func StrToSlice(string string) Slice {
//字符串数组: a1,a2,a3转["a1","a2","a3"] //字符串数组: a1,a2,a3转["a1","a2","a3"]
func StrArrayToJsonStr(a string) string { func StrArrayToJsonStr(a string) string {
if len(a) != 0 { if len(a) > 2 {
if a[0] == ',' { if a[0] == ',' {
a = Substr(a, 1, len(a)-1) a = Substr(a, 1, len(a)-1)
} }