Documentation
¶
Overview ¶
Package utils provides some small utility functions.
Index ¶
- func Apply(repo, patch string, out io.Writer) error
- func Clone(repo, path, commit string, ignoredSubmodules []string, out io.Writer) error
- func Describe(repo, tagPrefix string) (string, error)
- func Download(destination, source string) error
- func Ensure(path, content string, force bool) error
- func Exists(path string) (bool, error)
- func Fetch(path, commit string, ignoredSubmodules []string, out io.Writer) error
- func IsDir(path string) (bool, error)
- func Link(path, target string) error
- func Log(out io.Writer, msg string)
- func Original(path, name string) (string, error)
- func Remove(path string) error
- func Resolve(path, base string) (string, error)
- func Sync(src, dst string) error
- func Update(path, content string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
Clone will check out the provided repository set it to the specified version and properly checkout all submodules.
func Describe ¶ added in v0.13.2
Describe will return the git version description of the provided repository.
func Ensure ¶ added in v0.13.0
Ensure will create a file with the provided content if it does not exist. If force is set to true, an existing file will be overwritten.
func Original ¶ added in v0.10.0
Original will return the original, unmodified contents of the specified file.
func Resolve ¶ added in v0.8.4
Resolve will resolve a path and us the provided base for relative paths.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.