Documentation ¶
Overview ¶
NETWORK.GO Contains bigger functions that have to do with Git or networking.
SYMLINKS.GO ------------ Contains bigger functions related to creating and handling symlinks.
SYSTEMS.GO Contains bigger functions that have to deal with paths or the filesystem.
UTILS.GO ------------ Contains utility functions and other small, useful things
Index ¶
- func BoolAnd(first bool, second bool) bool
- func CheckBetter(check int, better int, checkbetter bool) (int, bool)
- func CloneRepo(stagePath string, repo string) string
- func CloneTemplate(repo string)
- func DieIfError(err error, message string)
- func GetEnv(lookup string, fallback string) string
- func GetTemplateDir(repo string) string
- func HandleDir(dir string) string
- func HandleDirPath(baseDir string, link string, finalDir string, name string) []string
- func HandleFilePath(finalDir string, name string)
- func InitTemplate(repo string, exec string, linuxloc string, macloc string, windowsloc string)
- func InstallFlavours(baseDir string, mode string, flavour string, ctprc structs.Program, ...) []string
- func InstallLinks(baseDir string, entry structs.Entry, to string, finalDir string, mode string) []string
- func IsWindows() bool
- func ListContains(list []string, contains string) bool
- func MakeLinks(baseDir string, links []string, to string, finalDir string) []string
- func MakeLocation(packages string, location []string)
- func OSReadDir(root string) ([]string, error)
- func PathExists(path string) bool
- func PullUpdates(repo string)
- func SearchRepos(repos structs.SearchRes, term string) structs.SearchEntry
- func ShareDir() string
- func UpdateJSON()
- func UserHomeDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBetter ¶ added in v0.3.0
CheckBetter checks if better is greater than check. If it is, it returns better, otherwise it returns check. It also returns a BoolAnd of checkbetter and if better > check.
func CloneTemplate ¶ added in v1.0.0
func CloneTemplate(repo string)
CloneTemplate creates the template directory and clones the template repo into it.
func DieIfError ¶ added in v1.0.0
DieIfError kills the program if err is not nil.
func GetTemplateDir ¶ added in v1.0.0
GetTemplateDir gets the location of the template directory.
func HandleDir ¶ added in v0.2.4
HandleDir handles a directory, replacing certain parts with known attributes.
func HandleDirPath ¶ added in v0.2.4
HandleDirPath is a function to handle a directory when making a symlink
func HandleFilePath ¶ added in v0.2.4
HandleFilePath handles files that are made with symlinks
func InitTemplate ¶ added in v1.0.0
InitTemplate initializes a template repo for the repo name specified.
func InstallFlavours ¶ added in v0.4.0
func InstallFlavours(baseDir string, mode string, flavour string, ctprc structs.Program, installLoc string) []string
InstallFlavours is a wrapper for InstallLinks which takes the flavour and handles the install accordingly
func InstallLinks ¶ added in v0.4.0
func InstallLinks(baseDir string, entry structs.Entry, to string, finalDir string, mode string) []string
InstallLinks is a wrapper over MakeLinks that parses the mode and uses it to create the correct link, as specified by the ctprc.
func ListContains ¶ added in v0.3.0
ListContains checks if a list of strings contains a string
func MakeLinks ¶ added in v0.2.4
MakeLinks loops through a list and converts its attributes into arguments for MakeLink.
func MakeLocation ¶ added in v1.0.0
MakeLocation saves the locations written to during installation into a file for later access.
func OSReadDir ¶ added in v1.0.0
OSReadDir expands a directory path into a list of files within that directory. Not recursive.
func PullUpdates ¶ added in v0.2.4
func PullUpdates(repo string)
PullUpdates opens a git repo and pulls the latest changes.
func SearchRepos ¶ added in v0.3.0
func SearchRepos(repos structs.SearchRes, term string) structs.SearchEntry
SearchRepos searches through a SearchRes for the best match
func ShareDir ¶ added in v0.2.4
func ShareDir() string
ShareDir generates the share directory for the cli.
func UpdateJSON ¶ added in v0.3.0
func UpdateJSON()
UpdateJSON makes a search request for all Catppuccin repos and caches them.
func UserHomeDir ¶ added in v0.2.4
func UserHomeDir() string
UserHomeDir gets the user's home directory
Types ¶
This section is empty.