INNER CODE UNIT · Go
cleanupTimeout
nicholas-fedor/watchtower · cmd/notify-upgrade.go:25
const cleanupTimeout = 5 * time.Minute
// Errors for notify-upgrade operations.
var (
// errCreateTempFile indicates a failure to create a temporary file for notification URLs.
errCreateTempFile = errors.New("failed to create output file")
// errWriteTempFile indicates a failure to write notification URLs to the temporary file.
errWriteTempFile = errors.New("failed to write to output file")
// errSyncTempFile indicates a failure to sync the temporary file to disk.
errSyncTempFile = errors.New("failed to sync output file")
)
// init registers the notify-upgrade command with the root command.
// It follows Cobra's best practice of adding subcommands in an init function,
// avoiding global variables and ensuring proper command hierarchy setup.
func init() {
rootCmd.AddCommand(&cobra.Command{
Use: "notify-upgrade",