diff --git a/wechaty-puppet-service/config.go b/wechaty-puppet-service/config.go index 46ff808..e9073f1 100644 --- a/wechaty-puppet-service/config.go +++ b/wechaty-puppet-service/config.go @@ -2,33 +2,6 @@ package puppetservice import ( logger "github.com/wechaty/go-wechaty/wechaty-puppet/log" - "os" -) - -var ( - // WechatyPuppetHostieToken ... - // Deprecated: please use WechatyPuppetServiceToken TODO:will be deleted in the future - WechatyPuppetHostieToken string - - // WechatyPuppetHostieEndpoint ... - // Deprecated: please use WechatyPuppetHostieEndpoint TODO:will be deleted in the future - WechatyPuppetHostieEndpoint string - - // WechatyPuppetServiceToken ... - // Deprecated - WechatyPuppetServiceToken string - - // WechatyPuppetServiceEndpoint ... - // Deprecated - WechatyPuppetServiceEndpoint string ) var log = logger.L.WithField("module", "wechaty-puppet-service") - -func init() { - WechatyPuppetHostieToken, _ = os.LookupEnv("WECHATY_PUPPET_HOSTIE_TOKEN") - WechatyPuppetHostieEndpoint, _ = os.LookupEnv("WECHATY_PUPPET_HOSTIE_ENDPOINT") - - WechatyPuppetServiceToken, _ = os.LookupEnv("WECHATY_PUPPET_SERVICE_TOKEN") - WechatyPuppetServiceEndpoint, _ = os.LookupEnv("WECHATY_PUPPET_SERVICE_ENDPOINT") -} diff --git a/wechaty-puppet-service/envvars.go b/wechaty-puppet-service/envvars.go index 10fd819..de0d8cd 100644 --- a/wechaty-puppet-service/envvars.go +++ b/wechaty-puppet-service/envvars.go @@ -18,13 +18,6 @@ func envServiceToken(token string) (string, error) { return token, nil } - token = os.Getenv("WECHATY_PUPPET_HOSTIE_TOKEN") - if token != "" { - log.Trace("WECHATY_PUPPET_HOSTIE_TOKEN has been deprecated," + - "please use WECHATY_PUPPET_SERVICE_TOKEN instead.") - return token, nil - } - return "", ErrTokenNotFound } @@ -38,12 +31,6 @@ func envEndpoint(endpoint string) string { return endpoint } - endpoint = os.Getenv("WECHATY_PUPPET_HOSTIE_ENDPOINT") - if endpoint != "" { - log.Println("WECHATY_PUPPET_HOSTIE_ENDPOINT has been deprecated," + - "please use WECHATY_PUPPET_SERVICE_ENDPOINT instead.") - return endpoint - } return "" }