printer/plain.go
changeset 83 57afac822019
parent 77 23b2b6c5643e
--- a/printer/plain.go	Sun May 07 11:56:37 2017 +0200
+++ b/printer/plain.go	Sun May 07 13:06:47 2017 +0200
@@ -26,10 +26,10 @@
 
 // NewPrinterPlain returns a plaintext ResourcePrinter
 // For PlainPrinter, the option parameter contains the indent prefix.
-func NewPrinterPlain(option string) (*PlainPrinter, error) {
+func NewPrinterPlain(options Options) (*PlainPrinter, error) {
 	indentInc := "  "
-	if option != "" {
-		indentInc = option
+	if i, ok := options["indent"]; ok {
+		indentInc = i
 	}
 	return &PlainPrinter{Indent: indentInc}, nil
 }