filters

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s, arg string) bool

func HasPrefix

func HasPrefix(s, arg string) bool

func HasSuffix

func HasSuffix(s, arg string) bool

Types

type StringFilter

type StringFilter struct {
	Prefix   string
	Suffix   string
	Contains string
}

StringFilter allows a prefix/postfix/regex to be specified

func (*StringFilter) AddFlags

func (f *StringFilter) AddFlags(cmd *cobra.Command, optionPrefix, message string)

AddFlags adds cmd flags

func (*StringFilter) Matches

func (f *StringFilter) Matches(value string) bool

Matches returns true if the given filter matches the value

func (*StringFilter) String

func (f *StringFilter) String() string

Jump to

Keyboard shortcuts

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