Documentation ¶
Overview ¶
Package sync contains SyncCmd which downloads all global dot files to local machine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SyncCmd = &cobra.Command{ Use: "sync", Short: "Download all global dot files to local machine.", Long: "Download all global dot files to local machine.", Run: func(cmd *cobra.Command, args []string) { answers := struct { Platform string }{} if err := survey.Ask(questions, &answers); err != nil { utils.ExitOnError(err) } usr, err := user.Current() if err != nil { utils.ExitOnError(err) } templates := []string{"dot/dotfiles"} requireMap := map[string]interface{}{ "mac": answers.Platform == "Mac", "linux": answers.Platform == "Linux", "windows": answers.Platform == "Windows", } replaceMap := map[string]interface{}{ "username": usr.Username, "mac": answers.Platform == "Mac", "linux": answers.Platform == "Linux", "windows": answers.Platform == "Windows", } utils.GenerateFile(templates, usr.HomeDir, requireMap, replaceMap) }, }
SyncCmd downloads all global dot files to local machine.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.