Check arguments.
This commit is contained in:
@@ -11,6 +11,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
if len(os.Args) < 2 {
|
||||||
|
fmt.Printf("You need to specify a keyword to search.\n")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
articles := artifact.Read("data/articles.json")
|
articles := artifact.Read("data/articles.json")
|
||||||
|
|
||||||
tokens := make(map[string][]string)
|
tokens := make(map[string][]string)
|
||||||
|
|||||||
Reference in New Issue
Block a user