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 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 FindPort(out io.Writer) string
- 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 Resolve(path, base string) (string, error)
- func Sync(src, dst string) error
- func Update(path, content string) error
- type Port
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 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 FindPort ¶ added in v0.8.2
FindPort will return the fist known USB serial port or an empty string.
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 ¶
Click to show internal directories.
Click to hide internal directories.