xos

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllFilenamesInDir

func AllFilenamesInDir(root string) ([]string, error)

AllFilenamesInDir returns files which are not directories recursively found in directory path. The result is alphabetically sorted.

func EnvironMap

func EnvironMap() map[string]string

EnvironMap goes through all environment variables, saving them into a map with name being the key.

func EnvironMapLookup

func EnvironMapLookup(mapper func(name, value string) bool) map[string]string

EnvironMapLookup goes through all environment variables, saving them into a map with name being the key. When provided, the mapper function can be used to include variables.

For example, you would like to include some Go environment variables:

envMap := EnvironMapLookup(func(name, _ string) bool {
  return name == "GOROOT" || name == "GOPATH"
})

If no mapper is provided, EnvironMapLookup works exactly as EnvironMap.

func FChecksumMD5

func FChecksumMD5(fp io.ReadSeeker) (string, error)

func FChecksumSHA1

func FChecksumSHA1(fp io.ReadSeeker) (string, error)

func FChecksumSHA256

func FChecksumSHA256(fp io.ReadSeeker) (string, error)

func FilesInDir

func FilesInDir(path string) ([]string, error)

FilesInDir returns files which are not directories found in directory path. The result is alphabetically sorted.

func InDockerContainer

func InDockerContainer() bool

InDockerContainer returns true if the application is running within a Docker container.

func IsDir

func IsDir(path string) bool

IsDir returns whether path is a directory.

func IsRegularFile

func IsRegularFile(path string) bool

IsRegularFile returns whether path is a regular file.

func RegularFilesInDir

func RegularFilesInDir(path string) ([]string, error)

RegularFilesInDir returns regular files found in directory path.

func RegularFilesInDirWithFullPath

func RegularFilesInDirWithFullPath(path string) ([]string, error)

RegularFilesInDirWithFullPath returns regular files found in directory path with each path included in the filename.

Types

This section is empty.

Jump to

Keyboard shortcuts

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