utils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrElse

func GetOrElse(value interface{}, err error) func(defaultValue interface{}) interface{}

func Retry

func Retry(log logrus.Entry, timeout time.Duration, f func() (interface{}, interface{}, error)) (interface{}, interface{}, error)

retry takes any function f: () -> (interface, interface, error) and calls it with exponential backoff. If the function succeeds, it returns the values returned by f and the GitHub API response. If it continues to fail until a maximum time is reached, the last return values from the function as well as a timeout error.

func SliceStringsEq

func SliceStringsEq(a []string, b []string) bool

treats nil the same as empty slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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