From 32ad36a287f1eded549e42ad1bed77acb148be3b Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 14 Apr 2019 21:38:26 +0200 Subject: label-tool: unindent template --- label-tool/main.go | 106 ++++++++++++++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 53 deletions(-) (limited to 'label-tool/main.go') diff --git a/label-tool/main.go b/label-tool/main.go index b085bf8..39a840c 100644 --- a/label-tool/main.go +++ b/label-tool/main.go @@ -19,59 +19,59 @@ import ( var font *bdf.Font var tmpl = template.Must(template.New("form").Parse(` - - -

PT-CBP label printing tool

- - - -
- - -
- {{ if .Printer }} - -

Printer: {{ .Printer.Manufacturer }} {{ .Printer.Model }} -

Tape: - {{ if .Printer.LastStatus }} - {{ .Printer.LastStatus.MediaWidthMM }} mm × - {{ .Printer.LastStatus.MediaLengthMM }} mm - - {{ if .MediaInfo }} - (offset: {{ .MediaInfo.SideMarginPins }} pt, - print area: {{ .MediaInfo.PrintAreaPins }} pt) - {{ else }} - (unknown media) - {{ end }} - - {{ if .Printer.LastStatus.Errors }} - {{ range .Printer.LastStatus.Errors }} -

Error: {{ . }} - {{ end }} - {{ end }} - - {{ end }} - {{ if .InitErr }} - {{ .InitErr }} - {{ end }} - - {{ else }} -

Error: {{ .PrinterErr }} - {{ end }} -

-
-

Font: {{ .Font.Name }} -

-
-

- - - -

- -

-
- + + +

PT-CBP label printing tool

+ + + +
+ + +
+ {{ if .Printer }} + +

Printer: {{ .Printer.Manufacturer }} {{ .Printer.Model }} +

Tape: + {{ if .Printer.LastStatus }} + {{ .Printer.LastStatus.MediaWidthMM }} mm × + {{ .Printer.LastStatus.MediaLengthMM }} mm + + {{ if .MediaInfo }} + (offset: {{ .MediaInfo.SideMarginPins }} pt, + print area: {{ .MediaInfo.PrintAreaPins }} pt) + {{ else }} + (unknown media) + {{ end }} + + {{ if .Printer.LastStatus.Errors }} + {{ range .Printer.LastStatus.Errors }} +

Error: {{ . }} + {{ end }} + {{ end }} + + {{ end }} + {{ if .InitErr }} + {{ .InitErr }} + {{ end }} + + {{ else }} +

Error: {{ .PrinterErr }} + {{ end }} +

+
+

Font: {{ .Font.Name }} +

+
+

+ + + +

+ +

+
+ `)) func getPrinter() (*ql.Printer, error) { -- cgit v1.2.3-70-g09d2