env

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package env provides a simple interface to check for the runtime environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChecker

func NewChecker() *checker

NewChecker returns a new checker.

Types

type Check

type Check func(ctx context.Context) error

Check is the function signature for the checker.

func HasUser

func HasUser() Check

HasUser is checking if the current user is available.

func IsDirEmpty

func IsDirEmpty(path string) Check

IsDirEmpty is checking if the folder is not empty.

type Checker

type Checker interface {
	// Check runs the checker.
	Check(ctx context.Context, check ...Check) error
}

Checker is the interface for the checker.

Jump to

Keyboard shortcuts

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