util

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForUpdates

func CheckForUpdates(version string) (bool, error)

CheckForUpdates checks GitHub for any version updates

func CopyFile added in v0.3.0

func CopyFile(source string, destination string) error

CopyFile will copy a single file from the source path to the destination path

func CopyFiles added in v0.3.0

func CopyFiles(source string, destination string) error

CopyFiles will copy all files from the source directory, to the destination directory (non-recursive, one level deep only)

func DownloadFile

func DownloadFile(url string, path string) error

DownloadFile will download a url to a local file

func GenerateTimeString added in v0.0.3

func GenerateTimeString(duration time.Duration) string

GenerateTimeString generates a human readable time string (eg. "1 hour, 2 minutes and 12 seconds")

func GetClobberPath

func GetClobberPath() string

GetClobberPath returns the full path to the Clobber directory

func GetCloverPath

func GetCloverPath() string

GetCloverPath returns the full path to Clover

func GetExtPath added in v0.1.5

func GetExtPath() string

GetExtPath returns the full path to external packages

func GetHomePath

func GetHomePath() string

GetHomePath returns the full path to the user's home directory

func GetLastLogLine added in v0.3.0

func GetLastLogLine() (string, error)

GetLastLogLine returns the last line from the log file

func GetLogFilePath added in v0.0.6

func GetLogFilePath() string

GetLogFilePath returns the full path to the current log file

func GetLogsPath added in v0.0.6

func GetLogsPath() string

GetLogsPath returns the full path to the logs directory

func GetScorePath added in v0.3.2

func GetScorePath() string

GetScorePath returns the path to the highscore file

func GetSourcePath

func GetSourcePath() string

GetSourcePath returns the full path to the source/work directory

func GetVersionDump added in v0.1.5

func GetVersionDump() string

GetVersionDump returns a multi-line string containing the versions/commits for important dependencies and environments, like OS and LLVM versions

func StringReplaceFile

func StringReplaceFile(path string, find string, replace string) error

StringReplaceFile allows you to replace a string in a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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