Documentation ¶
Index ¶
- Constants
- Variables
- func FatalExitIfError(err error)
- func GetMacosUserName() string
- func IsRootUser() bool
- func MakeYesNoQuestion() bool
- func ScanChar() string
- func StringContains(slice []string, item string) bool
- func SubStringContains(lstr string, rstr string) bool
- func WaitResponse()
- type QuestionResult
Constants ¶
View Source
const ( QUESTION_RESULT_PATCH = QuestionResult("PATCH") QUESTION_RESULT_ADD = QuestionResult("ADD") QUESTION_RESULT_IGNORE = QuestionResult("IGNORE") QUESTION_RESULT_SHOW_DIFF = QuestionResult("SHOW_DIFF") QUESTION_RESULT_EDIT = QuestionResult("EDIT") )
Variables ¶
View Source
var ( Flags struct { Overwrite bool UsePanic bool FileNameFilter string } )
View Source
var PULL_CONFIG_ALLOWED_KEYS = []string{"y", "d", "n", "e"}
View Source
var PUSH_CONFIG_ALLOWED_KEYS = []string{"y", "p", "d", "e", "n"}
Functions ¶
func FatalExitIfError ¶
func FatalExitIfError(err error)
func GetMacosUserName ¶
func GetMacosUserName() string
func IsRootUser ¶
func IsRootUser() bool
func MakeYesNoQuestion ¶
func MakeYesNoQuestion() bool
func StringContains ¶
TODO: Replace below function with stdlib's one when it is merged Ref: https://stackoverflow.com/questions/10485743/contains-method-for-a-slice
func SubStringContains ¶
func WaitResponse ¶
func WaitResponse()
Types ¶
type QuestionResult ¶
type QuestionResult string
func MakeQuestion ¶
func MakeQuestion(allowedKeys []string) QuestionResult
Click to show internal directories.
Click to hide internal directories.