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
303 B

7 years ago
  1. package main
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "io/ioutil"
  6. )
  7. func readRepliesConfig() []string {
  8. var replies []string
  9. file, e := ioutil.ReadFile("repliesConfig.json")
  10. if e != nil {
  11. fmt.Println("error:", e)
  12. }
  13. content := string(file)
  14. json.Unmarshal([]byte(content), &replies)
  15. return replies
  16. }