Documentation ¶
Index ¶
- func AllFilenamesInDir(root string) ([]string, error)
- func EnvironMap() map[string]string
- func EnvironMapLookup(mapper func(name, value string) bool) map[string]string
- func FChecksumMD5(fp io.ReadSeeker) (string, error)
- func FChecksumSHA1(fp io.ReadSeeker) (string, error)
- func FChecksumSHA256(fp io.ReadSeeker) (string, error)
- func FilesInDir(path string) ([]string, error)
- func InDockerContainer() bool
- func IsDir(path string) bool
- func IsRegularFile(path string) bool
- func RegularFilesInDir(path string) ([]string, error)
- func RegularFilesInDirWithFullPath(path string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllFilenamesInDir ¶ added in v1.4.0
AllFilenamesInDir returns files which are not directories recursively found in directory path. The result is alphabetically sorted.
func EnvironMap ¶ added in v1.2.0
EnvironMap goes through all environment variables, saving them into a map with name being the key.
func EnvironMapLookup ¶ added in v1.2.0
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 ¶ added in v1.3.0
func FChecksumMD5(fp io.ReadSeeker) (string, error)
func FChecksumSHA1 ¶ added in v1.3.0
func FChecksumSHA1(fp io.ReadSeeker) (string, error)
func FChecksumSHA256 ¶ added in v1.3.0
func FChecksumSHA256(fp io.ReadSeeker) (string, error)
func FilesInDir ¶
FilesInDir returns files which are not directories found in directory path. The result is alphabetically sorted.
func InDockerContainer ¶ added in v1.1.0
func InDockerContainer() bool
InDockerContainer returns true if the application is running within a Docker container.
func IsRegularFile ¶
IsRegularFile returns whether path is a regular file.
func RegularFilesInDir ¶
RegularFilesInDir returns regular files found in directory path.
func RegularFilesInDirWithFullPath ¶
RegularFilesInDirWithFullPath returns regular files found in directory path with each path included in the filename.
Types ¶
This section is empty.