printer: stop printer_test.go looking like generated code
This commit is contained in:
@@ -6,26 +6,26 @@ import (
|
||||
"github.com/mmcloughlin/avo/printer"
|
||||
)
|
||||
|
||||
func ExampleConfig_GeneratedWarning() {
|
||||
func ExampleConfig_GeneratedBy() {
|
||||
// Default configuration named "avo".
|
||||
cfg := printer.NewDefaultConfig()
|
||||
fmt.Println(cfg.GeneratedWarning())
|
||||
fmt.Println(cfg.GeneratedBy())
|
||||
|
||||
// Name can be customized.
|
||||
cfg = printer.Config{
|
||||
Name: "mildred",
|
||||
}
|
||||
fmt.Println(cfg.GeneratedWarning())
|
||||
fmt.Println(cfg.GeneratedBy())
|
||||
|
||||
// Argv takes precedence.
|
||||
cfg = printer.Config{
|
||||
Argv: []string{"echo", "hello", "world"},
|
||||
Name: "mildred",
|
||||
}
|
||||
fmt.Println(cfg.GeneratedWarning())
|
||||
fmt.Println(cfg.GeneratedBy())
|
||||
|
||||
// Output:
|
||||
// Code generated by avo. DO NOT EDIT.
|
||||
// Code generated by mildred. DO NOT EDIT.
|
||||
// Code generated by command: echo hello world. DO NOT EDIT.
|
||||
// avo
|
||||
// mildred
|
||||
// command: echo hello world
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user