common

package
v1.0.70 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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]any) map[string]any

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