From: qydysky Date: Thu, 17 Sep 2020 07:15:11 +0000 (+0800) Subject: 62 X-Git-Tag: v0.0.2~13 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=9f829642b5010273a0d38ef0170d4a8e2a6954d2;p=part%2F.git 62 --- diff --git a/Sys.go b/Sys.go index 8d48e37..377c9c2 100644 --- a/Sys.go +++ b/Sys.go @@ -1,6 +1,7 @@ package part import ( + "fmt" "sync" "path/filepath" "os" @@ -26,6 +27,14 @@ func Sys () *sys { return &sys{} } +func (*sys) Type(s ...interface{}) string { + if len(s) == 0{return "nil"} + switch t := s[0].(type) { + default:return fmt.Sprintf("%T", t) + } + return "" +} + func (this *sys) Cdir()string{ this.Lock() defer this.Unlock()