2014-08-13 01:46:43 +08:00
|
|
|
package main
|
2014-06-27 07:24:16 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
var configCommand = cli.Command{
|
|
|
|
Name: "config",
|
|
|
|
Usage: "display the container configuration",
|
|
|
|
Action: configAction,
|
|
|
|
}
|
|
|
|
|
|
|
|
func configAction(context *cli.Context) {
|
2014-08-13 03:03:53 +08:00
|
|
|
container, err := loadConfig()
|
2014-06-27 07:24:16 +08:00
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
data, err := json.MarshalIndent(container, "", "\t")
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Printf("%s", data)
|
|
|
|
}
|