Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1453)

Unified Diff: mojom/mojom_parser/mojom_main.go

Issue 1833493002: Replace ErrorExit with log.Fatal in the mojom tool. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojom/mojom_parser/fmt_cmd.go ('k') | mojom/mojom_parser/parse_cmd.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/mojom_parser/mojom_main.go
diff --git a/mojom/mojom_parser/mojom_main.go b/mojom/mojom_parser/mojom_main.go
index 7bbdff7893e34abea4a3247aa619e514966eb5c1..05454635503b6bd2f1ec4fc5e38d10232c521e07 100644
--- a/mojom/mojom_parser/mojom_main.go
+++ b/mojom/mojom_parser/mojom_main.go
@@ -8,6 +8,7 @@ import (
"bytes"
"flag"
"fmt"
+ "log"
"os"
)
@@ -25,6 +26,7 @@ import (
// For further information about each command, see the file named
// <command>_cmd.go for example "parse_cmd.go" and "fmt_cmd.go".
func main() {
+ log.SetFlags(0)
checkVersion(os.Args)
commands := NewCommandSet()
commands.AddCommand("parse", parseCmd, "Parses mojom files.")
@@ -33,11 +35,6 @@ func main() {
commands.RunCommand(os.Args)
}
-func ErrorExit(message string) {
- fmt.Fprintf(os.Stderr, "%s\n", message)
- os.Exit(1)
-}
-
type command struct {
Name string
Func func([]string)
« no previous file with comments | « mojom/mojom_parser/fmt_cmd.go ('k') | mojom/mojom_parser/parse_cmd.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698