utils

package
v0.0.0-...-835c9c4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

CheckError checks for an error and exits if there is one

func CheckUnauthorized

func CheckUnauthorized(response *http.Response)

CheckUnauthorized checks for an unauthorized status code and exits if there is one

func EncodeBase64

func EncodeBase64(msg []byte) string

EncodeBase64 encodes the message into a web-safe base64 message

func GenerateOAuthChallenge

func GenerateOAuthChallenge(length int) string

GenerateOAuthChallenge generates a challenge of the given length and returns it as a string

func HashS256

func HashS256(data string) string

HashS256 calculates the SHA256 of the message and encodes it in web-safe base64

func NewBellSkipper

func NewBellSkipper() io.WriteCloser

NewBellSkipper creates an io.WriteCloser that fixes the bell issue with promptui/readline

Types

This section is empty.

Jump to

Keyboard shortcuts

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