github.com/pachyderm/pachyderm@v1.13.4/src/server/cmd/pachctl/main.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "os" 6 "strings" 7 8 "github.com/pachyderm/pachyderm/src/client/pkg/tracing" 9 "github.com/pachyderm/pachyderm/src/server/cmd/pachctl/cmd" 10 "github.com/spf13/pflag" 11 ) 12 13 func main() { 14 // Remove kubernetes client flags from the spf13 flag set 15 // (we link the kubernetes client, so otherwise they're in 'pachctl --help') 16 pflag.CommandLine = pflag.NewFlagSet(os.Args[0], pflag.ExitOnError) 17 tracing.InstallJaegerTracerFromEnv() 18 err := func() error { 19 defer tracing.CloseAndReportTraces() 20 return cmd.PachctlCmd().Execute() 21 }() 22 if err != nil { 23 if errString := strings.TrimSpace(err.Error()); errString != "" { 24 fmt.Fprintf(os.Stderr, "%s\n", errString) 25 } 26 os.Exit(1) 27 } 28 }