net/url.URL.Scheme (field)
94 uses
net/url (current package)
url.go#L359: Scheme string
url.go#L528: if url.Scheme, rest, err = getscheme(rawurl); err != nil {
url.go#L531: url.Scheme = strings.ToLower(url.Scheme)
url.go#L541: if url.Scheme != "" {
url.go#L564: if (url.Scheme != "" || !viaRequest && !strings.HasPrefix(rest, "///")) && strings.HasPrefix(rest, "//") {
url.go#L813: if u.Scheme != "" {
url.go#L814: buf.WriteString(u.Scheme)
url.go#L820: if u.Scheme != "" || u.Host != "" || u.User != nil {
url.go#L1054: return u.Scheme != ""
url.go#L1076: if ref.Scheme == "" {
url.go#L1077: url.Scheme = u.Scheme
url.go#L1079: if ref.Scheme != "" || ref.Host != "" || ref.User != nil {
url.go#L1125: result = u.Scheme + ":" + result
net/http
client.go#L151: if lastReq.Scheme == "https" && newReq.Scheme == "http" {
h2_bundle.go#L6325: if u.Scheme == "" {
h2_bundle.go#L6329: u.Scheme = wantScheme
h2_bundle.go#L6332: if u.Scheme != wantScheme {
h2_bundle.go#L6333: return fmt.Errorf("cannot push URL with scheme %q from request with scheme %q", u.Scheme, wantScheme)
h2_bundle.go#L6451: scheme: msg.url.Scheme,
h2_bundle.go#L6968: if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) {
h2_bundle.go#L6972: addr := http2authorityAddr(req.URL.Scheme, req.URL.Host)
h2_bundle.go#L7990: path = strings.TrimPrefix(path, req.URL.Scheme+"://"+host)
h2_bundle.go#L8029: f(":scheme", req.URL.Scheme)
h2_bundle.go#L9523: http2encKV(enc, ":scheme", w.url.Scheme)
request.go#L584: if usingProxy && r.URL.Scheme != "" && r.URL.Opaque == "" {
request.go#L585: ruri = r.URL.Scheme + "://" + host + ruri
request.go#L1070: req.URL.Scheme = ""
server.go#L2136: if u.Scheme == "" && u.Host == "" {
transport.go#L480: if req.URL.Scheme == "https" && req.requiresHTTP1() {
transport.go#L498: return altProto[req.URL.Scheme]
transport.go#L515: scheme := req.URL.Scheme
transport.go#L827: cm.targetScheme = treq.URL.Scheme
transport.go#L1620: case cm.proxyURL.Scheme == "socks5":
transport.go#L1808: if (cm.proxyURL.Scheme == "http" || cm.proxyURL.Scheme == "https") && cm.targetScheme == "http" {
transport.go#L1823: return cm.proxyURL.Scheme
transport.go#L2726: port = portMap[url.Scheme]
net/http/httputil
dump.go#L99: if req.URL.Scheme == "https" {
dump.go#L104: reqSend.URL.Scheme = "http"
reverseproxy.go#L145: req.URL.Scheme = target.Scheme
cloud.google.com/go/storage
post_policy_v4.go#L319: Scheme: scheme,
reader.go#L110: Scheme: o.c.scheme,
storage.go#L594: u.Scheme = "http"
storage.go#L596: u.Scheme = "https"
storage.go#L723: u.Scheme = "https"
github.com/aws/aws-sdk-go/aws/request
request.go#L631: if port != "" && isDefaultPort(r.URL.Scheme, port) {
github.com/go-git/go-git/v5/plumbing/transport
common.go#L191: Protocol: u.Scheme,
github.com/go-git/go-git/v5/plumbing/transport/http
common.go#L167: s.endpoint.Protocol = r.URL.Scheme
github.com/go-redis/redis/v8
options.go#L197: if u.Scheme != "redis" && u.Scheme != "rediss" {
options.go#L198: return nil, errors.New("invalid redis URL scheme: " + u.Scheme)
options.go#L238: if u.Scheme == "rediss" {
github.com/golang-migrate/migrate/v4/source
driver.go#L82: if u.Scheme == "" {
driver.go#L87: d, ok := drivers[u.Scheme]
driver.go#L90: return nil, fmt.Errorf("source driver: unknown driver %v (forgotten import?)", u.Scheme)
github.com/lib/pq
url.go#L38: if u.Scheme != "postgres" && u.Scheme != "postgresql" {
url.go#L39: return "", fmt.Errorf("invalid connection protocol: %s", u.Scheme)
github.com/microcosm-cc/bluemonday
sanitize.go#L528: if u.Scheme != "" {
sanitize.go#L530: urlPolicy, ok := p.allowURLSchemes[u.Scheme]
golang.org/x/net/http2
server.go#L2770: if u.Scheme == "" {
server.go#L2774: u.Scheme = wantScheme
server.go#L2777: if u.Scheme != wantScheme {
server.go#L2778: return fmt.Errorf("cannot push URL with scheme %q from request with scheme %q", u.Scheme, wantScheme)
server.go#L2896: scheme: msg.url.Scheme,
transport.go#L465: if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) {
transport.go#L469: addr := authorityAddr(req.URL.Scheme, req.URL.Host)
transport.go#L1487: path = strings.TrimPrefix(path, req.URL.Scheme+"://"+host)
transport.go#L1526: f(":scheme", req.URL.Scheme)
write.go#L273: encKV(enc, ":scheme", w.url.Scheme)
golang.org/x/net/proxy
proxy.go#L91: switch u.Scheme {
proxy.go#L104: if f, ok := proxySchemes[u.Scheme]; ok {
proxy.go#L109: return nil, errors.New("proxy: unknown scheme: " + u.Scheme)
golang.org/x/pkgsite/internal/frontend
playground.go#L19: var playgroundURL = &url.URL{Scheme: "https", Host: "play.golang.org"}
playground.go#L38: req.URL.Scheme = pgURL.Scheme
golang.org/x/pkgsite/internal/index
index.go#L42: if u.Scheme != "https" {
index.go#L43: return nil, fmt.Errorf("scheme must be https (got %s)", u.Scheme)
golang.org/x/pkgsite/internal/middleware
betaRedirect.go#L70: Scheme: "https",
google.golang.org/grpc
proxy.go#L46: Scheme: "https",
rpc_util.go#L840: scheme := t.Scheme
google.golang.org/grpc/internal/credentials
spiffe.go#L41: if uri == nil || uri.Scheme != "spiffe" || uri.Opaque != "" || (uri.User != nil && uri.User.Username() != "") {
vendor/golang.org/x/net/http/httpproxy
proxy.go#L129: if reqURL.Scheme == "https" {
proxy.go#L131: } else if reqURL.Scheme == "http" {
proxy.go#L154: (proxyURL.Scheme != "http" &&
proxy.go#L155: proxyURL.Scheme != "https" &&
proxy.go#L156: proxyURL.Scheme != "socks5") {
proxy.go#L288: port = portMap[url.Scheme]
 |
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. |