Documentation ¶
Index ¶
- Constants
- Variables
- func CopyFiles(srcPath string, dstPath string)
- func EditFile(filePath string)
- func GetGitBranchName() string
- func GetProfileName() string
- func GetRemoteConfigFolderName() string
- func HandleWhiteSpaceInPath(path string) string
- func ReadJSON(filePath string) map[string]string
- func ReadLocalPreference() map[string]string
- func RelativePathToAbs(path string) string
- func ReplaceMacOSUserName(path string) string
- func WriteJSON(filePath string, jsonData map[string]string)
- func WriteLocalPreference(localPreference map[string]string)
- type KeychainPreferenceType
- type MacSyncConfigs
Constants ¶
View Source
const ( PREFERENCE_DIR_PATH = "~/Library/Preferences/Mac-sync-config" MAC_SYNC_CONFIGS_FILE = "mac-sync-configs.yaml" )
View Source
const GH_BOT_EMAIL = "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
View Source
const PRESS_ANYKEY_HELP_MSG = "Press any key to continue."
View Source
const PULL_HELP_MSG = `Press 'y' to update the configuration.
Press 'n' to ignore.
Press 'd' to view diff.
Press 'q' to quit.`
View Source
const PUSH_HELP_MSG = `` /* 170-byte string literal not displayed */
Variables ¶
View Source
var (
Git gitManipulator
)
View Source
var (
Github gitHubManipulator
)
View Source
var KeychainPreference = GetKeychainPreference()
View Source
var (
LocalPreferencePath = strings.Join([]string{PREFERENCE_DIR_PATH, "local-preference.json"}, "/")
)
View Source
var (
Logger loggerType
)
Functions ¶
func GetGitBranchName ¶
func GetGitBranchName() string
func GetProfileName ¶
func GetProfileName() string
func GetRemoteConfigFolderName ¶
func GetRemoteConfigFolderName() string
func HandleWhiteSpaceInPath ¶
func ReadLocalPreference ¶
func RelativePathToAbs ¶
func ReplaceMacOSUserName ¶
func WriteLocalPreference ¶
Types ¶
type KeychainPreferenceType ¶
type KeychainPreferenceType struct { GithubId string `json:"github_id"` GithubAccessToken string `json:"github_access_token"` MacSyncConfigGitRepositoryName string `json:"repository_name"` }
func GetKeychainPreference ¶
func GetKeychainPreference() KeychainPreferenceType
type MacSyncConfigs ¶
type MacSyncConfigs struct {
ConfigPathsToSync []string `yaml:"sync"`
}
func ReadMacSyncConfigFile ¶
func ReadMacSyncConfigFile(filepath string) MacSyncConfigs
Source Files ¶
Click to show internal directories.
Click to hide internal directories.