Documentation
¶
Index ¶
- func CloseAndLog(ctx context.Context, c Closer, msg string, keysAndValues ...any)
- func CloseIgnoreAndLog[I any](ctx context.Context, c CloserIgnore[I])
- func MergeMaps[K comparable, V any](base, override map[K]V) map[K]V
- func RemoveAndLog(ctx context.Context, path string)
- type Closer
- type CloserIgnore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseAndLog ¶
CloseAndLog is a utility function that closes a resource and logs any error that occurs. It should be used for defers to ensure that the resource is closed properly and any errors are logged.
func CloseIgnoreAndLog ¶
func CloseIgnoreAndLog[I any](ctx context.Context, c CloserIgnore[I])
CloseIgnoreAndLog is a utility function that closes a resource and logs any error that occurs, and ignores the result. It should be used for defers to ensure that the resource is closed properly and any errors are logged.
func MergeMaps ¶
func MergeMaps[K comparable, V any](base, override map[K]V) map[K]V
MergeMaps merges two maps, with the values from the second map overriding the values from the first map.
func RemoveAndLog ¶ added in v0.2.6
Types ¶
type CloserIgnore ¶
Click to show internal directories.
Click to hide internal directories.