Documentation
¶
Index ¶
- Variables
- func Command(cmd string) (*exec.Cmd, error)
- func FileExists(path string) bool
- func GetWithDefault(m map[string]interface{}, key string, d interface{}) interface{}
- func HasKey(m map[string]interface{}, key string) bool
- func RunCommand(cmd string) error
- func UseVerboseLog()
- func ViperGetStringOrFail(key string) (string, error)
- func ViperReadAndMerge(path string)
- type DryRunError
Constants ¶
This section is empty.
Variables ¶
var Logger = dlog.NewLogger()
Logger is the default logger with info level
Functions ¶
func FileExists ¶ added in v0.0.3
FileExists return if a file exists and can be read by current program http://stackoverflow.com/questions/12518876/how-to-check-if-a-file-exists-in-go
func GetWithDefault ¶ added in v0.0.2
GetWithDefault return default vaule if certain key does not exists
func RunCommand ¶ added in v0.0.2
RunCommand runs a commad and show all output in console, block current routine
func ViperGetStringOrFail ¶ added in v0.0.3
ViperGetStringOrFail returns string without any conversion FIXED: https://github.com/dyweb/Ayi/issues/54
func ViperReadAndMerge ¶ added in v0.0.3
func ViperReadAndMerge(path string)
ViperReadAndMerge read specified config file and merge
Types ¶
type DryRunError ¶ added in v0.0.4
type DryRunError struct {
Command string
}
DryRunError indicate user specified -n flag and the command is only displayed but not actually exectuted https://gobyexample.com/errors https://blog.golang.org/error-handling-and-go
func (*DryRunError) Error ¶ added in v0.0.4
func (e *DryRunError) Error() string