You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
308 B

package main
import (
"encoding/json"
"fmt"
"io/ioutil"
)
func readKeywordsConfig() []string {
var keywords []string
file, e := ioutil.ReadFile("keywordsConfig.json")
if e != nil {
fmt.Println("error:", e)
}
content := string(file)
json.Unmarshal([]byte(content), &keywords)
return keywords
}