Use cobra's builtin machinery for creating new types

This commit is contained in:
Kovid Goyal
2022-08-17 12:35:14 +05:30
parent a0bff4abab
commit 6c25f0cf4b
3 changed files with 36 additions and 39 deletions

View File

@@ -1,7 +1,6 @@
package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
@@ -19,7 +18,7 @@ func main() {
cli.Init(root)
if err := root.Execute(); err != nil {
fmt.Fprintln(os.Stderr, "Error:", err)
cli.PrintError(err)
os.Exit(1)
}
}