Help us shape the future of Go! Take the 2026 Go Developer Survey

utils

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Base64Token = "base64"
)

Variables

This section is empty.

Functions

func BasicAuth added in v1.13.0

func BasicAuth(username, password string) string

See 2 (end of page 4) https://www.ietf.org/rfc/rfc2617.txt "To receive authorization, the client sends the userid and password, separated by a single colon (":") character, within a base64 encoded string in the credentials." It is not meant to be urlencoded.

func ExtractFromComplexValue

func ExtractFromComplexValue(value string) (string, error)

ExtractFromComplexValue does extract value from following structure base64(<encoded value>) and is decoding the value itself

func FileExist added in v1.4.4

func FileExist(path string) (bool, error)

FileExist checks if a filesystem path exists. It distinguishes between "does not exist" and other errors (e.g., permission denied).

Types

This section is empty.

Jump to

Keyboard shortcuts

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