filters

package
Version: v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL