when

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(conditions ...Condition) bool

All returns true if and only if all the passed conditions are true. If an empty conditions list is passed, it also returns true.

Types

type Condition

type Condition func() bool

Condition is any function that can return true or false

func EnvExists

func EnvExists(envVars map[string]string) Condition

EnvExists creates a Condition returning true when the environment variables are defined in the environment and matched the values passed as arguments.

func FileExists

func FileExists(path string) Condition

FileExists creates a Condition returning true when the passed file path exists

Jump to

Keyboard shortcuts

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