From 0235a00545479aa43d42d948a294157270ed1a94 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 19 Jun 2013 13:22:48 -0700 Subject: [PATCH] builder/digitalocean: compile with scrub changes --- builder/digitalocean/api.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builder/digitalocean/api.go b/builder/digitalocean/api.go index 7721a9939..f8987c467 100644 --- a/builder/digitalocean/api.go +++ b/builder/digitalocean/api.go @@ -13,6 +13,7 @@ import ( "log" "net/http" "net/url" + "strings" ) const DIGITALOCEAN_API_URL = "https://api.digitalocean.com" @@ -172,8 +173,8 @@ func NewRequest(d DigitalOceanClient, path string, params string) (map[string]in var decodedResponse map[string]interface{} // 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.APIKey, "API_KEY") + scrubbedUrl := strings.Replace(url, d.ClientID, "CLIENT_ID", -1) + scrubbedUrl = strings.Replace(scrubbedUrl, d.APIKey, "API_KEY", -1) log.Printf("sending new request to digitalocean: %s", scrubbedUrl) resp, err := client.Get(url)