utils

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo added in v0.2.4

func CloneRepo(repo string) string

CloneRepo clones a repo into the specified location.

func GetEnv

func GetEnv(lookup string, fallback string) string

GetEnv gets an environment variable. If not defined, it gets the fallback.

func HandleDir added in v0.2.4

func HandleDir(dir string) string

HandleDir handles a directory, replacing certain parts with known attributes.

func HandleDirPath added in v0.2.4

func HandleDirPath(finalDir string, name string)

HandleDirPath is a function to handle a directory when making a symlink

func HandleFilePath added in v0.2.4

func HandleFilePath(finalDir string, name string)

HandleFilePath handles files that are made with symlinks

func IsWindows

func IsWindows() bool

IsWindows checks if OS is Windows

func MakeLinks(baseDir string, links []string, to string, finalDir string)

MakeLinks loops through a list and converts it's attributes into arguments for MakeLink.

func PathExists

func PathExists(path string) bool

PathExists checks if a path exists

func PullUpdates added in v0.2.4

func PullUpdates(repo string)

PullUpdates opens a git repo and pulls the latest changes.

func ShareDir added in v0.2.4

func ShareDir() string

ShareDir generates the share directory for the cli.

func UserHomeDir added in v0.2.4

func UserHomeDir() string

UserHomeDir gets the user's home directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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