common

package
v1.0.69 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MatchAny = func() StringPredicateFn {
		return func(s string) bool {
			return true
		}
	}
	MatchNone = func() StringPredicateFn {
		return func(s string) bool {
			return false
		}
	}
	MatchRe = func(re *regexp.Regexp) StringPredicateFn {
		return func(s string) bool {
			return re.MatchString(s)
		}
	}
)
View Source
var (
	FileOpener = os.Open
)

Functions

func FailingReader added in v1.0.66

func FailingReader() io.Reader

func FailingWriter added in v1.0.66

func FailingWriter() io.Writer

func NewYamlEncoder added in v1.0.66

func NewYamlEncoder(w io.Writer) *yaml.Encoder

NewYamlEncoder creates and uniformly configures yaml.Encoder across project

func Unflatten added in v1.0.66

func Unflatten(in map[string]interface{}) map[string]interface{}

Unflatten map entries into new map.

func Unique added in v1.0.66

func Unique(in []string) []string

Types

type EmptyChecker added in v1.0.65

type EmptyChecker interface {
	// IsEmpty returns true if this instance is "empty".
	IsEmpty() bool
}

EmptyChecker interface can be used to check is implementing struct is "empty".

type StringPredicateFn added in v1.0.59

type StringPredicateFn func(string) bool

Jump to

Keyboard shortcuts

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