utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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 ScanChar

func ScanChar() string

func StringContains

func StringContains(slice []string, item string) bool

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 SubStringContains(lstr string, rstr string) bool

func WaitResponse

func WaitResponse()

Types

type QuestionResult

type QuestionResult string

func MakeQuestion

func MakeQuestion(allowedKeys []string) QuestionResult

Jump to

Keyboard shortcuts

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