mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Clean up the CircleCI module's API credentials loading
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
)
|
||||
|
||||
const APIEnvKey = "WTF_CIRCLE_API_KEY"
|
||||
@@ -59,7 +61,10 @@ func circleRequest(path string) (*http.Response, error) {
|
||||
}
|
||||
|
||||
func apiKey() string {
|
||||
return os.Getenv(APIEnvKey)
|
||||
return wtf.Config.UString(
|
||||
"wtf.mods.circleci.apiKey",
|
||||
os.Getenv(APIEnvKey),
|
||||
)
|
||||
}
|
||||
|
||||
func parseJson(obj interface{}, text io.Reader) {
|
||||
|
||||
Reference in New Issue
Block a user