Skip to content

Commit

Permalink
Merge pull request #47 from xushiwei/q
Browse files Browse the repository at this point in the history
pysigfetch
  • Loading branch information
xushiwei committed May 18, 2024
2 parents a946487 + 85574f9 commit e4301ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions chore/pysigfetch/pysigfetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ type module struct {
Items []any `json:"items"`
}

// Usage: pysigfetch pageType [name ...]
// Usage: pysigfetch module [name ...]
func main() {
if len(os.Args) < 3 {
fmt.Fprintln(os.Stderr, "Usage: pysigfetch pageType [name ...]")
fmt.Fprintln(os.Stderr, "Usage: pysigfetch module [name ...]")
os.Exit(1)
}
pageType := os.Args[1]
moduleName := os.Args[1]
names := os.Args[2:]
docs := make([]any, len(names))
for i, name := range names {
docs[i] = fetcher.FromInput(pageType, name)
docs[i] = fetcher.FromInput(moduleName, name)
}
json.NewEncoder(os.Stdout).Encode(module{pageType, docs})
json.NewEncoder(os.Stdout).Encode(module{moduleName, docs})
}

0 comments on commit e4301ca

Please sign in to comment.