utils

package
v0.0.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExistAndHasContent

func DirExistAndHasContent(dirPath string) error

func FileHasContent

func FileHasContent(file string) error

func GetAllEnvVarsFromHost

func GetAllEnvVarsFromHost() map[string]string

func IsAGitRepository added in v0.0.7

func IsAGitRepository(repoRoot string, levels int) (gitRoot, subDir string, err error)

IsAGitRepository checks if the given directory or any of its parent directories up to `levels` is a git repository. It returns the git root directory, the subdirectory passed relative to the git root, and any error encountered.

func IsValidDirE

func IsValidDirE(path string) error

func MergeSlices added in v0.0.8

func MergeSlices(slices ...[]string) []string

Types

type EnvVar

type EnvVar struct {
	Name  string
	Value string
}

func GetAllEnvVarsFromHostAsStruct

func GetAllEnvVarsFromHostAsStruct(envVarNames []string) []EnvVar

Jump to

Keyboard shortcuts

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