2024-10-28 15:49:24 +02:00
|
|
|
// Code generated by 'internal/releaser'; DO NOT EDIT.
|
2024-10-07 17:35:08 +02:00
|
|
|
|
|
|
|
package useragent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
// ourUserAgent is the User-Agent of this underlying library package.
|
2024-12-20 16:11:10 +02:00
|
|
|
ourUserAgent = "goacme-lego/4.21.0"
|
2024-10-07 17:35:08 +02:00
|
|
|
|
|
|
|
// ourUserAgentComment is part of the UA comment linked to the version status of this underlying library package.
|
|
|
|
// values: detach|release
|
|
|
|
// NOTE: Update this with each tagged release.
|
2024-12-20 16:11:30 +02:00
|
|
|
ourUserAgentComment = "detach"
|
2024-10-07 17:35:08 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// Get builds and returns the User-Agent string.
|
|
|
|
func Get() string {
|
|
|
|
return fmt.Sprintf("%s (%s; %s; %s)", ourUserAgent, ourUserAgentComment, runtime.GOOS, runtime.GOARCH)
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetHeader sets the User-Agent header.
|
|
|
|
func SetHeader(h http.Header) {
|
|
|
|
h.Set("User-Agent", Get())
|
|
|
|
}
|