util

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBoolNode added in v0.3.0

func BuildBoolNode(key, value, comment string) []*yaml.Node

func BuildIntNode added in v0.3.0

func BuildIntNode(key, value, comment string) []*yaml.Node

func BuildMapNode added in v0.3.0

func BuildMapNode(key, comment string) (*yaml.Node, *yaml.Node)

func BuildSequenceNode added in v0.3.0

func BuildSequenceNode(key, comment string) (*yaml.Node, *yaml.Node)

func BuildStringNode added in v0.3.0

func BuildStringNode(key, value, comment string) []*yaml.Node

func FileExists

func FileExists(path string) (bool, error)

func TempAppFile added in v0.9.0

func TempAppFile(tmpDir, fileName, fileContent string) *os.File

Types

type BellSkipper added in v0.7.0

type BellSkipper struct{}

bellSkipper implements an io.WriteCloser that skips the terminal bell character (ASCII code 7), and writes the rest to os.Stderr. It is used to replace readline.Stdout, that is the package used by promptui to display the prompts.

This is a workaround for the bell issue documented in https://github.com/manifoldco/promptui/issues/49.

func (*BellSkipper) Close added in v0.7.0

func (bs *BellSkipper) Close() error

Close implements an io.WriterCloser over os.Stderr.

func (*BellSkipper) Write added in v0.7.0

func (bs *BellSkipper) Write(b []byte) (int, error)

Write implements an io.WriterCloser over os.Stderr, but it skips the terminal bell character.

type HttpRequest added in v0.7.0

type HttpRequest struct {
	Body        *map[string]string
	Url         string
	Method      string //one of POST, GET, etc.
	BearerToken *string
	// contains filtered or unexported fields
}

func NewHttpRequest added in v0.7.0

func NewHttpRequest(method string, url string, body map[string]string, bearerToken *string, optionalTimeoutSeconds ...time.Duration) HttpRequest

func (*HttpRequest) Execute added in v0.7.0

func (request *HttpRequest) Execute() (*http.Response, error)

Jump to

Keyboard shortcuts

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