File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 "net/http"
99 "os"
1010 "os/exec"
11- "strconv"
1211 "strings"
1312 "time"
1413
@@ -71,20 +70,12 @@ type GetterSetter interface {
7170// Returns:
7271// This puts an *etcd.Client into the context.
7372func CreateClient (c cookoo.Context , p * cookoo.Params ) (interface {}, cookoo.Interrupt ) {
74- host := os .Getenv (hostEnvVar )
75- port , err := strconv .Atoi (os .Getenv (portEnvVar ))
76- if host == "" {
77- host = defaultHost
78- }
79- if err != nil {
80- port = 4001
73+ url , ok := p .Get ("url" , "http://localhost:4001" ).(string )
74+ if ! ok {
75+ fmt .Println ("ERROR: 'url' param was not a string" )
76+ os .Exit (1 )
8177 }
8278
83- // Aaron(12/9/2015): to shame me into fixing this later, but it's a bigger change
84- fmt .Println ("Aaron hasn't fixed the env var collection stage in the cookoo route yet..." )
85- // url := p.Get("url", "http://localhost:4001").(string)
86- url := fmt .Sprintf ("%s:%d" , host , port )
87-
8879 // Backed this out because it's unnecessary so far.
8980 //hosts := p.Get("urls", []string{"http://localhost:4001"}).([]string)
9081 hosts := []string {url }
You can’t perform that action at this time.
0 commit comments