Help us shape the future of Go! Take the 2026 Go Developer Survey

cleanup

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package cleanup is for the errors of releasing something after the work is done: closing a connection, shutting a server down, removing a temporary file. The work has already succeeded or failed by then, so the error cannot change the outcome; it is logged instead of dropped.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(c io.Closer, what string)

Close closes c and logs a failure, naming what was closed.

func Remove

func Remove(path string)

Remove deletes the file at path and logs a failure; a file that is already gone is not one.

func Report

func Report(step string, err error)

Report logs err, if there is one, as a failed cleanup step.

func Served

func Served(server string, err error)

Served logs why a server stopped serving, unless it was asked to stop (http.ErrServerClosed).

func Shutdown

func Shutdown(report *do.ShutdownReport)

Shutdown logs the services of a container that did not shut down cleanly.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL