Source File
host_prefix.go
Belonging Package
github.com/aws/aws-sdk-go/private/protocol
package protocol
import (
)
const HostPrefixHandlerName = "awssdk.endpoint.HostPrefixHandler"
func ( string, func() map[string]string) request.NamedHandler {
:= HostPrefixBuilder{
Prefix: ,
LabelsFn: ,
}
return request.NamedHandler{
Name: HostPrefixHandlerName,
Fn: .Build,
}
}
func ( HostPrefixBuilder) ( *request.Request) {
if aws.BoolValue(.Config.DisableEndpointHostPrefix) {
return
}
var map[string]string
if .LabelsFn != nil {
= .LabelsFn()
}
:= .Prefix
for , := range {
= strings.Replace(, "{"++"}", , -1)
}
.HTTPRequest.URL.Host = + .HTTPRequest.URL.Host
if len(.HTTPRequest.Host) > 0 {
.HTTPRequest.Host = + .HTTPRequest.Host
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |