dockviz/images.go

29 lines
548 B
Go
Raw Normal View History

2014-04-21 18:30:55 +02:00
package main
import "fmt"
type ImagesCommand struct {
Dot bool `short:"d" long:"dot" description:"Show image information as Graphviz dot."`
Tree bool `short:"t" long:"tree" description:"Show image information as tree."`
}
var imagesCommand ImagesCommand
func (x *ImagesCommand) Execute(args []string) error {
if imagesCommand.Dot {
fmt.Println("Output dot")
} else if imagesCommand.Tree {
fmt.Println("Output tree")
}
return nil
}
func init() {
parser.AddCommand("images",
"Visualize docker images.",
"",
&imagesCommand)
}