net/http.Request.SetBasicAuth (method) one use net/http (current package) request.go#L974: func (r *Request) SetBasicAuth(username, password string) {
The pages are generated with Golds v0.2.8-preview. (GOOS=darwin GOARCH=arm64)