filters

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2015 License: Apache-2.0 Imports: 3 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.

Jump to

Keyboard shortcuts

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