| 1 |
// Code generated by 'internal/releaser'; DO NOT EDIT. |
| 2 |
|
| 3 |
package useragent |
| 4 |
|
| 5 |
import ( |
| 6 |
"fmt" |
| 7 |
"net/http" |
| 8 |
"runtime" |
| 9 |
) |
| 10 |
|
| 11 |
const ( |
| 12 |
// ourUserAgent is the User-Agent of this underlying library package. |
| 13 |
ourUserAgent = "goacme-lego/{{ .version }}" |
| 14 |
|
| 15 |
// ourUserAgentComment is part of the UA comment linked to the version status of this underlying library package. |
| 16 |
// values: detach|release |
| 17 |
// NOTE: Update this with each tagged release. |
| 18 |
ourUserAgentComment = "{{ .comment }}" |
| 19 |
) |
| 20 |
|
| 21 |
// Get builds and returns the User-Agent string. |
| 22 |
func Get() string { |
| 23 |
return fmt.Sprintf("%s (%s; %s; %s)", ourUserAgent, ourUserAgentComment, runtime.GOOS, runtime.GOARCH) |
| 24 |
} |
| 25 |
|
| 26 |
// SetHeader sets the User-Agent header. |
| 27 |
func SetHeader(h http.Header) { |
| 28 |
h.Set("User-Agent", Get()) |
| 29 |
} |