From 9f829642b5010273a0d38ef0170d4a8e2a6954d2 Mon Sep 17 00:00:00 2001 From: qydysky Date: Thu, 17 Sep 2020 15:15:11 +0800 Subject: [PATCH] 62 --- Sys.go | 9 +++++++++ 1 file changed, 9 insertions(+) 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() -- 2.39.2