MCPcopy Index your code
hub / github.com/docker/cli / Close

Method Close

cli/command/container/create.go:170–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168}
169
170func (cid *cidFile) Close() error {
171 if cid.file == nil {
172 return nil
173 }
174 _ = cid.file.Close()
175
176 if cid.written {
177 return nil
178 }
179 if err := os.Remove(cid.path); err != nil && !errors.Is(err, os.ErrNotExist) {
180 return fmt.Errorf("failed to remove the CID file: %w", err)
181 }
182
183 return nil
184}
185
186func (cid *cidFile) Write(id string) error {
187 if cid.file == nil {

Calls 1

RemoveMethod · 0.65