Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreYouSure ¶
func AreYouSure(message string, reader UserInputReader) bool
func PrettyJSON ¶
Example (Empty) ¶
data := bytes.NewBufferString("").Bytes()
result := PrettyJSON(data)
fmt.Println(result)
Example (Notjson) ¶
data := bytes.NewBufferString("<garbage>").Bytes()
result := PrettyJSON(data)
fmt.Println(result)
Example (Output) ¶
data := bytes.NewBufferString("{\"cat\":\"meow\"}").Bytes()
result := PrettyJSON(data)
fmt.Println(result)
Output: { "cat": "meow" }
Types ¶
type CommandRunner ¶
type CommandRunner struct {
}
func (CommandRunner) RunCommand ¶
func (cr CommandRunner) RunCommand(name string, arg ...string) error
type StdinInputReader ¶
type StdinInputReader struct{}
func NewStdinInputReader ¶
func NewStdinInputReader() *StdinInputReader
type UserInputReader ¶
Click to show internal directories.
Click to hide internal directories.