updated CLI README.md

This commit is contained in:
Benjamin Böhmke
2020-02-23 09:51:48 +01:00
parent 75a3d22c53
commit 1891633250
2 changed files with 9 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ go install github.com/leonelquinteros/gotext/cli/xgotext
## Usage
```
xgotext /path/to/go/package [/path/to/output/dir]
xgotext -in /path/to/go/package -out /path/to/output/dir
```
## Implementation
@@ -31,7 +31,7 @@ tr := "Translate this string"
gotext.Get(tr)
```
The CLI tool doesn't traverse sub-directories and other packages.
The CLI tool traverse sub-directories based on the given input directory.
## Contribute

View File

@@ -20,6 +20,13 @@ func main() {
// Init logger
log.SetFlags(0)
if *dirName == "" {
log.Fatal("No input directory given")
}
if *outputDir == "" {
log.Fatal("No output directory given")
}
data, err := parser.ParseDirRec(*dirName)
if err != nil {
log.Fatal(err)