# Packages
No description provided by the author
# Functions
CheckSHA256 returns an error if the hash of reader mismatches `sha`.
Checksum returns the sha1 sum of target file.
Copy copies a file or directory from src to dst.
CreateDir creates the directory if it not exists.
CurrentUser returns current login user.
FmtVer converts a version string to SemVer format, if the string is not a valid SemVer and fails to parse and convert it, an error is raised.
GetFreePort asks the kernel for a free open port that is ready to use.
IsEmptyDir check whether a path is an empty directory.
IsExecBinary check whether a path is a valid executable.
IsExist check whether a path is exist.
IsFlagSetByUser check if the a flag is set by user explicitly.
IsNotExist check whether a path is not exist.
IsSubDir returns if sub is a sub directory of parent.
IsSymExist check whether a symbol link is exist.
IsTimeoutOrMaxRetry return true if it's timeout or reach max retry.
JoinInt joins a slice of int to string.
MatchGroups turns a slice of matched string to a map according to capture group name.
Move moves a file from src to dst, this is done by copying the file and then delete the old one.
MustAtoI calls strconv.Atoi and ignores error.
MustGetFreePort asks the kernel for a free open port that is ready to use, if fail, panic.
NewConstraint creates a constraint to check whether a semver is valid.
NewHTTPClient returns a new HTTP client with timeout and HTTPS support.
OpenFileInEditor opens filename in a text editor.
PostFile upload file.
RebuildArgs move "--help" or "-h" flag to the end of the arg list.
Retry retries the func until it returns no error or reaches attempts limit or timed out, either one is earlier.
RetryUntil when the when func returns true.
SaveFileWithBackup will backup the file before save it.
SHA256 returns the hash of reader.
SHA512 returns the hash of reader.
ShowDiff write diff result into the Writer.
TailN try get the latest n line of the file.
Untar decompresses the tarball.
UserHome returns home directory of current user.
ValidateSpecDiff checks and validates the new spec to see if the modified keys are all marked as editable.
# Constants
DefaultEditor is vi because we're adults ;).
LatestVersionAlias represents the latest build (excluding nightly versions).
NightlyVersionAlias represents latest build of master branch.
# Variables
ErrPropSuggestion is a property of an Error that will be printed as the suggestion.
ErrTraitPreCheck means that the Error is a pre-check error so that no error logs will be outputted directly.
ErrValidateChecksum is an empty HashValidationErr object, useful for type checking.
# Structs
Constraint for semver.
HashValidationErr is the error indicates a failed hash validation.
HTTPClient is a wrap of http.Client.
RetryOption is options for Retry().
# Type aliases
No description provided by the author