Browse Source

some followup changes to the renaming of the password parameter

develop
parent
commit
2f00b1fb09
  1. 2
      main.go
  2. 4
      rt2/rt2.go

2
main.go

@ -131,7 +131,7 @@ func main() {
os.Exit(0)
}
rtClient, err := NewClient(conf.RT2.URL, conf.RT2.User, conf.RT2.Token, conf.RT2.Insecure, *debug)
rtClient, err := NewClient(conf.RT2.URL, conf.RT2.User, conf.RT2.Password, conf.RT2.Insecure, *debug)
//rtClient, err := rt.NewClient(conf.RT.URL, conf.RT.User, conf.RT.Password, conf.RT.Insecure)
if err != nil {

4
rt2/rt2.go

@ -289,9 +289,9 @@ func BuildJSONRequest(client *Client, method string, url string, body io.Reader)
}
req.Header.Set("Content-Type", "application/json")
if client.user == "" {
req.Header.Set("Authorization", fmt.Sprintf("token %s", client.token))
req.Header.Set("Authorization", fmt.Sprintf("token %s", client.password))
} else {
req.SetBasicAuth(client.user, client.token)
req.SetBasicAuth(client.user, client.password)
}
if client.debug {

Loading…
Cancel
Save