From bbe3baa5291dcb9c06a89a56fe28eb308d158d02 Mon Sep 17 00:00:00 2001 From: bruce Date: Tue, 13 Jun 2023 10:50:03 +0800 Subject: [PATCH] fix(service): change CheckToken from pointer to Function. --- uzsdk/service.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uzsdk/service.go b/uzsdk/service.go index f513d83..ac63db6 100644 --- a/uzsdk/service.go +++ b/uzsdk/service.go @@ -140,10 +140,10 @@ type TokenCheckFunc func(token string, options ...interface{}) bool // Instance is the framework's instance, used for server & plugin both. type Instance struct { - Conf *Configuration // configuration of this application. - Db *sqlx.DB // the first database connection created by main routine. - Logger *logger.Logger // logger created by main routine. - Router *gin.Engine // default webservice engine created by main routine. - Maintenance bool // when maintenance mode is true, only serve api /config. - CheckToken *TokenCheckFunc // pointer of check token function. + Conf *Configuration // configuration of this application. + Db *sqlx.DB // the first database connection created by main routine. + Logger *logger.Logger // logger created by main routine. + Router *gin.Engine // default webservice engine created by main routine. + Maintenance bool // when maintenance mode is true, only serve api /config. + CheckToken TokenCheckFunc // function of check token. } -- 2.43.5