updated CLI README.md
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user