validation

package
v0.0.0-...-84ddfae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateHost

func ValidateHost(host string) (string, error)

ValidateHost validates and canonicalizes a host. TODO finish this Talk about canonicalization of cache keys. Is this required at all for git credential helpers? It seems safe to run "net/idna".ToASCII first.

Figure out if "net/http"'s conditional ToASCII call (see idnaASCII in https://golang.org/src/net/http/request.go?s=23078:23124)
is needed by us too.

1. Ports complicate canonicalization logic because in general we don't want to know about protocols used. 2. Go requires a dot in the host. It is stricter than what is accepted by net.Dial* functions (and (*net.Dialer).Dial* functions).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL