github.com/fraugster/parquet-go@v0.12.0/cmd/parquet-tool/cmds/cat.go (about) 1 package cmds 2 3 import ( 4 "log" 5 "os" 6 7 "github.com/spf13/cobra" 8 ) 9 10 func init() { 11 rootCmd.AddCommand(catCmd) 12 } 13 14 var catCmd = &cobra.Command{ 15 Use: "cat file-name.parquet", 16 Short: "Print the parquet file content", 17 Run: func(cmd *cobra.Command, args []string) { 18 if len(args) != 1 { 19 _ = cmd.Usage() 20 os.Exit(1) 21 } 22 23 if err := catFile(os.Stdout, args[0], -1); err != nil { 24 log.Fatal(err) 25 } 26 }, 27 }