utils

package
v0.0.0-...-a16ed4d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(path string) bool

FileExists returns whether or not the specified file (or symlink to a file) exists.

func IsDirectory

func IsDirectory(path string) bool

IsDirectory returns true if the file exists and it is a directory.

func IsWithinPath

func IsWithinPath(basepath string, path string) bool

IsWithinPath returns whether or not path is within the heirarchy of basepath.

func Parallel

func Parallel(ctx context.Context, maxConcurrent int, fns ...func())

Parallel runs at most maxConcurrent functions in parallel.

func StringSliceContains

func StringSliceContains(slice []string, value string) bool

StringSliceContains returns whether value is in slice.

func ULID

func ULID() ulid.ULID

ULID returns a new Universally Unique Lexicographically Sortable Identifier based on the current time.

func ULIDString

func ULIDString() string

ULIDString returns a ULID as a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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