Source File
user_agent.go
Belonging Package
github.com/aws/smithy-go/transport/http
package http
import (
)
// UserAgentBuilder is a builder for a HTTP User-Agent string.
type UserAgentBuilder struct {
sb strings.Builder
}
// NewUserAgentBuilder returns a new UserAgentBuilder.
func () *UserAgentBuilder {
return &UserAgentBuilder{sb: strings.Builder{}}
}
// AddKey adds the named component/product to the agent string
func ( *UserAgentBuilder) ( string) {
.appendTo()
}
// AddKeyValue adds the named key to the agent string with the given value.
func ( *UserAgentBuilder) (, string) {
.appendTo( + "/" + )
}
// Build returns the constructed User-Agent string. May be called multiple times.
func ( *UserAgentBuilder) () string {
return .sb.String()
}
func ( *UserAgentBuilder) ( string) {
if .sb.Len() > 0 {
.sb.WriteRune(' ')
}
.sb.WriteString()
}
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)