Documentation ¶ Overview ¶ Package safeclose provides a helper to safely close resources with error logging. Index ¶ func Log(name string, c interface{ ... }) func LogSimple(name string, c interface{ ... }) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Log ¶ func Log(name string, c interface{ Close() error }) Log closes c and writes a warning to stderr on error. name identifies the resource in the log message. Use for deferred Close() calls where the error is not actionable (best-effort cleanup). func LogSimple ¶ func LogSimple(name string, c interface{ Close() }) LogSimple is like Log but for types whose Close method returns nothing. Types ¶ This section is empty. Source Files ¶ View all Source files safeclose.go Click to show internal directories. Click to hide internal directories.