(yamlfile string)
| 96 | } |
| 97 | |
| 98 | func (c *conf) getConf(yamlfile string) *conf { |
| 99 | |
| 100 | yamlFile, err := ioutil.ReadFile(yamlfile) |
| 101 | if err != nil { |
| 102 | log.Printf("yamlFile.Get err #%v ", err) |
| 103 | } |
| 104 | err = yaml.Unmarshal(yamlFile, c) |
| 105 | if err != nil { |
| 106 | log.Fatalf("Unmarshal: %v", err) |
| 107 | } |
| 108 | |
| 109 | return c |
| 110 | } |
| 111 | |
| 112 | func options() *FlagOptions { |
| 113 | sleeptime := flag.String("Sleep", "", "Initial beacon sleep time") |