diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-17 13:41:44 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-17 13:41:44 +0900 |
commit | 2d3fed9f2992a11ab76601484a735d5500d84dba (patch) | |
tree | 643e1995e7b012af1fc0ff48e3bcb1b0ec95489b /cmd/vartan/root.go | |
parent | Add a line number to token error messages (diff) | |
download | urubu-2d3fed9f2992a11ab76601484a735d5500d84dba.tar.gz urubu-2d3fed9f2992a11ab76601484a735d5500d84dba.tar.xz |
Improve syntax error messages
- Add a source file name to error messages.
- Add a line that an error occurred at to error messages.
Diffstat (limited to 'cmd/vartan/root.go')
-rw-r--r-- | cmd/vartan/root.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cmd/vartan/root.go b/cmd/vartan/root.go index ad163a6..a193577 100644 --- a/cmd/vartan/root.go +++ b/cmd/vartan/root.go @@ -1,9 +1,6 @@ package main import ( - "fmt" - "os" - "github.com/spf13/cobra" ) @@ -19,10 +16,5 @@ var rootCmd = &cobra.Command{ } func Execute() error { - err := rootCmd.Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "%v\n", err) - return err - } - return nil + return rootCmd.Execute() } |