Documentation
¶
Index ¶
- func FileExists(filename string) bool
- func IsTerminalWriter(w io.Writer) bool
- func LetsUserDir() (string, error)
- func LetsUserFile(name string) (string, error)
- func OpenEditor(path string) error
- func OpenURL(url string) error
- func ParseVersion(version string) (*semver.Version, error)
- func SafeCreateDir(dirPath string) error
- func WriteFileAtomic(dst string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
FileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
func IsTerminalWriter ¶ added in v0.0.62
IsTerminalWriter reports whether w is connected to an interactive terminal. Writers that are not backed by a file descriptor (e.g. buffers used in tests, or pipes) are treated as non-terminals.
func LetsUserDir ¶
func LetsUserFile ¶
func OpenEditor ¶ added in v0.0.62
func SafeCreateDir ¶
func WriteFileAtomic ¶ added in v0.0.62
WriteFileAtomic writes data to dst via a sibling temp file and an os.Rename, so dst is never left in a partially-written state if the process is interrupted. The resulting file has 0o644 permissions.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.