(path string)
| 283 | } |
| 284 | |
| 285 | func newRecorder(path string) (*recorder, error) { |
| 286 | file, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o600) |
| 287 | if err != nil { |
| 288 | return nil, err |
| 289 | } |
| 290 | return &recorder{file: file}, nil |
| 291 | } |
| 292 | |
| 293 | func (r *recorder) Write(entry *record) { |
| 294 | line, err := json.Marshal(entry) |
no outgoing calls