File tree Expand file tree Collapse file tree 2 files changed +0
-40
lines changed Expand file tree Collapse file tree 2 files changed +0
-40
lines changed Original file line number Diff line number Diff line change @@ -2,33 +2,6 @@ package puppetservice
22
33import (
44 logger "github.com/wechaty/go-wechaty/wechaty-puppet/log"
5- "os"
6- )
7-
8- var (
9- // WechatyPuppetHostieToken ...
10- // Deprecated: please use WechatyPuppetServiceToken TODO:will be deleted in the future
11- WechatyPuppetHostieToken string
12-
13- // WechatyPuppetHostieEndpoint ...
14- // Deprecated: please use WechatyPuppetHostieEndpoint TODO:will be deleted in the future
15- WechatyPuppetHostieEndpoint string
16-
17- // WechatyPuppetServiceToken ...
18- // Deprecated
19- WechatyPuppetServiceToken string
20-
21- // WechatyPuppetServiceEndpoint ...
22- // Deprecated
23- WechatyPuppetServiceEndpoint string
245)
256
267var log = logger .L .WithField ("module" , "wechaty-puppet-service" )
27-
28- func init () {
29- WechatyPuppetHostieToken , _ = os .LookupEnv ("WECHATY_PUPPET_HOSTIE_TOKEN" )
30- WechatyPuppetHostieEndpoint , _ = os .LookupEnv ("WECHATY_PUPPET_HOSTIE_ENDPOINT" )
31-
32- WechatyPuppetServiceToken , _ = os .LookupEnv ("WECHATY_PUPPET_SERVICE_TOKEN" )
33- WechatyPuppetServiceEndpoint , _ = os .LookupEnv ("WECHATY_PUPPET_SERVICE_ENDPOINT" )
34- }
Original file line number Diff line number Diff line change @@ -18,13 +18,6 @@ func envServiceToken(token string) (string, error) {
1818 return token , nil
1919 }
2020
21- token = os .Getenv ("WECHATY_PUPPET_HOSTIE_TOKEN" )
22- if token != "" {
23- log .Trace ("WECHATY_PUPPET_HOSTIE_TOKEN has been deprecated," +
24- "please use WECHATY_PUPPET_SERVICE_TOKEN instead." )
25- return token , nil
26- }
27-
2821 return "" , ErrTokenNotFound
2922}
3023
@@ -38,12 +31,6 @@ func envEndpoint(endpoint string) string {
3831 return endpoint
3932 }
4033
41- endpoint = os .Getenv ("WECHATY_PUPPET_HOSTIE_ENDPOINT" )
42- if endpoint != "" {
43- log .Println ("WECHATY_PUPPET_HOSTIE_ENDPOINT has been deprecated," +
44- "please use WECHATY_PUPPET_SERVICE_ENDPOINT instead." )
45- return endpoint
46- }
4734 return ""
4835}
4936
You can’t perform that action at this time.
0 commit comments