fix: user-agent string order. (#566)

This commit is contained in:
Ludovic Fernandez 2018-06-03 20:23:01 +02:00 committed by Wyatt Johnson
parent 27e0f97c9d
commit 7fedfd1388
2 changed files with 2 additions and 2 deletions

View file

@ -155,6 +155,6 @@ func postJSON(j *jws, uri string, reqBody, respBody interface{}) (http.Header, e
// userAgent builds and returns the User-Agent string to use in requests.
func userAgent() string {
ua := fmt.Sprintf("%s (%s; %s) %s %s", defaultGoUserAgent, runtime.GOOS, runtime.GOARCH, ourUserAgent, UserAgent)
ua := fmt.Sprintf("%s %s (%s; %s) %s", UserAgent, ourUserAgent, runtime.GOOS, runtime.GOARCH, defaultGoUserAgent)
return strings.TrimSpace(ua)
}

View file

@ -68,7 +68,7 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) {
log.Fatal(err)
}
acme.UserAgent = fmt.Sprintf("le-go/cli %s", c.App.Version)
acme.UserAgent = fmt.Sprintf("lego-cli/%s", c.App.Version)
client, err := acme.NewClient(c.GlobalString("server"), acc, keyType)
if err != nil {