Commit b78fd17a authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/digitalocean: compile with scrub changes

parent a775c979
...@@ -13,6 +13,7 @@ import ( ...@@ -13,6 +13,7 @@ import (
"log" "log"
"net/http" "net/http"
"net/url" "net/url"
"strings"
) )
const DIGITALOCEAN_API_URL = "https://api.digitalocean.com" const DIGITALOCEAN_API_URL = "https://api.digitalocean.com"
...@@ -172,8 +173,8 @@ func NewRequest(d DigitalOceanClient, path string, params string) (map[string]in ...@@ -172,8 +173,8 @@ func NewRequest(d DigitalOceanClient, path string, params string) (map[string]in
var decodedResponse map[string]interface{} var decodedResponse map[string]interface{}
// Do some basic scrubbing so sensitive information doesn't appear in logs // Do some basic scrubbing so sensitive information doesn't appear in logs
scrubbedUrl := strings.Replace(url, d.ClientID, "CLIENT_ID") scrubbedUrl := strings.Replace(url, d.ClientID, "CLIENT_ID", -1)
scrubbedUrl := strings.Replace(url, d.APIKey, "API_KEY") scrubbedUrl = strings.Replace(scrubbedUrl, d.APIKey, "API_KEY", -1)
log.Printf("sending new request to digitalocean: %s", scrubbedUrl) log.Printf("sending new request to digitalocean: %s", scrubbedUrl)
resp, err := client.Get(url) resp, err := client.Get(url)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment