loaders

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package loaders implements helpers to initialize global state inside the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lazy

func Lazy(once *sync.Once, f func() error) error

Lazy runs the function only once and returns the error if there is one. If the function has already been executed it will never return an error.

It is safe for concurrent use as it uses the once provided to it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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