filters

package
v0.0.194 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 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 string, arg string) bool

func HasPrefix

func HasPrefix(s string, arg string) bool

func HasSuffix

func HasSuffix(s string, 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 string, 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