()
| 167 | } |
| 168 | |
| 169 | func (stat *Statistor) Json() string { |
| 170 | content, err := json.Marshal(stat) |
| 171 | if err != nil { |
| 172 | return err.Error() |
| 173 | } |
| 174 | return string(content) + "\n" |
| 175 | } |
| 176 | |
| 177 | func ReadStatistors(filename string) (Statistors, error) { |
| 178 | content, err := ioutil.ReadFile(filename) |
no test coverage detected