Documentation ¶
Index ¶
- func Debug() bool
- func ExecOutput(cmd string, args ...string) (string, error)
- func GitCmd() string
- func GoCmd() string
- func LogIfDebug(msg string, v ...interface{})
- func LogIfVerbose(msg string, v ...interface{})
- func Md5(file string) (string, error)
- func RunCmd(name string, arg ...string) error
- func Sha1(file string) (string, error)
- func Sha256(file string) (string, error)
- func TrimString(val string) string
- func Verbose() bool
- func ZipFiles(filename string, files []string) error
- type ChecksumDetails
- type FileDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶ added in v0.6.5
func Debug() bool
Debug reports whether a magefile was run with the debug flag.
func ExecOutput ¶
ExecOutput executes a command and returns its standard output
func GitCmd ¶ added in v0.6.5
func GitCmd() string
GitCmd reports the command to use to extract git info. By default it is the "go" binary in the PATH.
func GoCmd ¶ added in v0.6.5
func GoCmd() string
GoCmd reports the command to use to build go code. By default it is the "go" binary in the PATH.
func LogIfDebug ¶ added in v0.6.6
func LogIfDebug(msg string, v ...interface{})
LogIfDebug logs message if debug flag is on.
func LogIfVerbose ¶ added in v0.6.6
func LogIfVerbose(msg string, v ...interface{})
LogIfVerbose logs message if verbose flag is on.
func RunCmd ¶ added in v1.0.1
RunCmd runs the given command displaying its standard output if in verbose mode
Types ¶
type ChecksumDetails ¶
ChecksumDetails provides check sums
func GetChecksumDetails ¶
func GetChecksumDetails(filePath string) (ChecksumDetails, error)
GetChecksumDetails returns file checksums for a given file
type FileDetails ¶
type FileDetails struct { Checksum ChecksumDetails Size int64 }
FileDetails provides check sums and size for a given file
func GetFileDetails ¶
func GetFileDetails(filePath string) (*FileDetails, error)
GetFileDetails returns file details for a given file