util

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAcceptedCiphers added in v0.0.26

func GetAcceptedCiphers() map[string]uint16

GetAcceptedCiphers returns all the ciphers supported by the crypto/tls package

func GetClientTLSConfig

func GetClientTLSConfig(caFile, certFile, keyFile, serverName string, protos []string) (*tls.Config, error)

GetClientTLSConfig returns tlsConfig based on x509 certs

func Normalize

func Normalize(s string) string

Normalize replaces underscores with hyphens we should always use hyphens instead of underscores when registering component flags

func PrettyPrintURL added in v0.0.15

func PrettyPrintURL(urlEncode string) string

PrettyPrintURL decodes the URL encoded input string and print each key=val pair separated by comma

func RedirectTo added in v0.0.17

func RedirectTo(to string) func(http.ResponseWriter, *http.Request)

RedirectTo redirects request to a certain destination.

func RemovePortFromHost added in v0.0.15

func RemovePortFromHost(host string) string

RemovePortFromHost removes port number from the host address that may be of the form "<host>:<port>" where the <host> can be an either an IPv4/6 address or a domain name

Types

This section is empty.

Jump to

Keyboard shortcuts

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