From 3383679bc8cdfb51b061c294bef925f7fd26a92b Mon Sep 17 00:00:00 2001 From: Vadym Slizov Date: Mon, 9 Mar 2020 12:44:10 +0200 Subject: [PATCH] update readme --- README.md | 3 ++- main.go | 16 ++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 183f31e..d79f867 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ php-parser [flags] ... | flag | type | description | |-------|------|----------------------------------------------| +| -p | bool | print filepath | | -d |string| dump format: [custom, go, json, pretty-json] | | -r | bool | resolve names | | -ff | bool | parse and show free floating strings | @@ -71,7 +72,7 @@ import ( func main() { src := []byte(` [%d] %s\n", counter, res.path) + if *printPath { + fmt.Fprintf(os.Stdout, "==> [%d] %s\n", counter, res.path) + } for _, e := range res.parser.GetErrors() { - // if !strings.Contains(e.Msg, "WARNING") { - // fmt.Print("\n\n\n" + parserWorker.GetPath() + "\n ") - // panic(e.Msg) - // } - fmt.Fprintln(w, e) + fmt.Fprintf(os.Stdout, "==> %s\n", e) } if *printBack {