filters

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorBadFormat = errors.New("bad format of filter (expected name=value)")

Functions

func ToParam

func ToParam(a Args) (string, error)

packs the Args into an string for easy transport from client to server

Types

type Args

type Args map[string][]string

func FromParam

func FromParam(p string) (Args, error)

unpacks the filter Args

func ParseFlag

func ParseFlag(arg string, prev Args) (Args, error)

Parse the argument to the filter flag. Like

`docker ps -f 'created=today' -f 'image.name=ubuntu*'`

If prev map is provided, then it is appended to, and returned. By default a new map is created.

func (Args) Match added in v1.4.0

func (filters Args) Match(field, source string) bool

Jump to

Keyboard shortcuts

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