Documentation ¶
Index ¶
- func GetDirectoryHash(dirPath string) (string, error)
- func GetEnv(key string, defaultVal string) string
- func GetEnvAsBool(key string, defaultVal bool) bool
- func GetEnvAsInt(key string, defaultVal int) int
- func GetFileHash(filePath string) (string, error)
- func GetTemplateHash(paths ...string) (string, error)
- func MD5All(root string) (map[string][md5.Size]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDirectoryHash ¶
GetDirectoryHash returns a MD5 sum of a directory, calculated as the hash of all contained files' hashes. If walking the directory or any read operation fails, GetDirectoryHash returns an error. In that case, GetDirectoryHash does not wait for inflight read operations to complete.
func GetEnvAsBool ¶
func GetEnvAsInt ¶
func GetFileHash ¶
GetFileHash returns a MD5 sum of a file, calculated using the file's content
func GetTemplateHash ¶
func MD5All ¶
MD5All reads all the files in the file tree rooted at root and returns a map from file path to the MD5 sum of the file's contents. If the directory walk fails or any read operation fails, MD5All returns an error. In that case, MD5All does not wait for inflight read operations to complete.
Types ¶
This section is empty.