github.com/cvmfs/docker-graphdriver@v0.0.0-20181206110523-155ec6df0521/docker2cvmfs/cmd/manifest.go (about)

     1  package cmd
     2  
     3  import (
     4  	"encoding/json"
     5  	"fmt"
     6  	"github.com/cvmfs/docker-graphdriver/docker2cvmfs/lib"
     7  	"github.com/spf13/cobra"
     8  )
     9  
    10  var PrintManifest = &cobra.Command{
    11  	Use:   "manifest",
    12  	Short: "Show manifest",
    13  	Run: func(cmd *cobra.Command, args []string) {
    14  		flag := cmd.Flags().Lookup("registry")
    15  		var registry string = string(flag.Value.String())
    16  
    17  		manifest, _ := lib.GetManifest(registry, args[0])
    18  		buffer, _ := json.MarshalIndent(manifest, "", " ")
    19  		fmt.Println(string(buffer))
    20  	},
    21  }