Skip to content

Commit 6e2107c

Browse files
authored
refactor(puppetservice): remove hostie nv (#157)
1 parent 149e07c commit 6e2107c

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

wechaty-puppet-service/config.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,6 @@ package puppetservice
22

33
import (
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

267
var 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-
}

wechaty-puppet-service/envvars.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)