Documentation ¶
Index ¶
Constants ¶
View Source
const (
// RetryLimit is a number how many times bucket creation is retried before returning an error.
RetryLimit = 3
)
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(err error)
Check checks if an error is present. If it is present, it displays the error and exits with status 1. If you want to display a custom message use CheckWithMessage.
func ErrAlreadyExists ¶
ErrAlreadyExists is called in case of a file conflict.
func ErrNotFound ¶
ErrNotFound is called when a source copied from doesn't exists.
func RetryOnFailure ¶ added in v0.3.0
RetryOnFailure calls the given function for a certain (RetryLimit) number of times. The function should be an inline function, so it can set return values. The function returns an error. The retries stop, if the result is ok. After the certain number of times expired, it logs the error anyway.
Types ¶
Click to show internal directories.
Click to hide internal directories.