From c2975beda7526e61bb4f49e3f9e7f8d511256581 Mon Sep 17 00:00:00 2001 From: NorthLan <6995syu@163.com> Date: Tue, 19 Apr 2022 16:52:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DtypeOfSession=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/method.go | 7 ++++--- interface.go | 3 --- internal/log/logger.go | 2 +- version.go | 4 ++++ 4 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 version.go diff --git a/component/method.go b/component/method.go index 420a633..f8792ff 100644 --- a/component/method.go +++ b/component/method.go @@ -1,15 +1,16 @@ package component import ( + "git.noahlan.cn/northlan/ngs/session" "reflect" "unicode" "unicode/utf8" ) var ( - typeOfError = reflect.TypeOf((*error)(nil)).Elem() - typeOfBytes = reflect.TypeOf(([]byte)(nil)) - //typeOfSession = reflect.TypeOf(session.New(nil)) + typeOfError = reflect.TypeOf((*error)(nil)).Elem() + typeOfBytes = reflect.TypeOf(([]byte)(nil)) + typeOfSession = reflect.TypeOf(session.New(nil)) ) func isExported(name string) bool { diff --git a/interface.go b/interface.go index abc7538..cac704d 100644 --- a/interface.go +++ b/interface.go @@ -19,9 +19,6 @@ import ( var running int32 -// VERSION returns current ngs version -var VERSION = "0.1.0" - var ( // app represents the current server process app = &struct { diff --git a/internal/log/logger.go b/internal/log/logger.go index a868daa..2e0b2cd 100644 --- a/internal/log/logger.go +++ b/internal/log/logger.go @@ -13,7 +13,7 @@ type Logger interface { } func init() { - SetLogger(log.New(os.Stderr, "[NGServer]", log.LstdFlags|log.Lshortfile)) + SetLogger(log.New(os.Stderr, "[NGServer] ", log.LstdFlags|log.Lshortfile)) } var ( diff --git a/version.go b/version.go new file mode 100644 index 0000000..b3ff863 --- /dev/null +++ b/version.go @@ -0,0 +1,4 @@ +package ngs + +// VERSION returns current ngs version +const VERSION = "0.1.1"