Skip to content

Commit

Permalink
let the client library handle setting auth
Browse files Browse the repository at this point in the history
  • Loading branch information
corylanou committed Apr 13, 2015
1 parent 011fdd0 commit ec33228
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/influx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ func (c *CommandLine) connect(cmd string) {
} else {
u.Host = c.Host
}
if c.Username != "" {
u.User = url.UserPassword(c.Username, c.Password)
}
cl, err := client.NewClient(
client.Config{
URL: u,
Expand Down Expand Up @@ -243,6 +240,9 @@ func (c *CommandLine) SetAuth() {
return
}
c.Password = p

// Update the client as well
c.Client.SetAuth(c.Username, c.Password)
}

func (c *CommandLine) use(cmd string) {
Expand Down

0 comments on commit ec33228

Please sign in to comment.