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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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