(id string)
| 184 | } |
| 185 | |
| 186 | func (cid *cidFile) Write(id string) error { |
| 187 | if cid.file == nil { |
| 188 | return nil |
| 189 | } |
| 190 | if _, err := cid.file.WriteString(id); err != nil { |
| 191 | return fmt.Errorf("failed to write the container ID (%s) to file: %w", id, err) |
| 192 | } |
| 193 | cid.written = true |
| 194 | return nil |
| 195 | } |
| 196 | |
| 197 | func newCIDFile(cidPath string) (*cidFile, error) { |
| 198 | if cidPath == "" { |
no outgoing calls