From e43623d10841a1db0dabe1d1173f2125e0269d8a Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 2 Oct 2018 11:50:01 +0200 Subject: [PATCH] default type check 'string' does not use 'reflect' no more --- internal/checker/default/string/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/checker/default/string/main.go b/internal/checker/default/string/main.go index aadd55a..78d62a3 100644 --- a/internal/checker/default/string/main.go +++ b/internal/checker/default/string/main.go @@ -2,7 +2,6 @@ package main import ( "git.xdrm.io/go/aicra/driver" - "reflect" ) func main() {} @@ -20,8 +19,8 @@ func (sck StringChecker) Check(value interface{}) bool { return false } - kind := reflect.TypeOf(value).Kind() + _, ok := value.(string) - return kind == reflect.String + return ok }