Skip to content

Commit 3d8dbde

Browse files
committed
gofmt -s
1 parent 4c365e0 commit 3d8dbde

File tree

16 files changed

+20
-21
lines changed

16 files changed

+20
-21
lines changed

cmd/pdftext/conv.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build exclude
2+
23
package main
34

45
import (

cmd/pdftext/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func getObjects(pdf *pdfReader, page int) ([]string, []interface{}) {
217217
resources, _ := pdf.GetDict(dict["Resources"])
218218
xobjects, _ := pdf.GetDict(resources["XObject"])
219219
xnames := []string{}
220-
for name, _ := range xobjects {
220+
for name := range xobjects {
221221
xnames = append(xnames, name)
222222
}
223223
sort.Strings(xnames)

cmd/pdftext/writer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (w *pdfWriter) Close() error {
118118
maxObj = ref[0]
119119
}
120120
}
121-
for ref, _ := range w.objects {
121+
for ref := range w.objects {
122122
if maxObj < ref[0] {
123123
maxObj = ref[0]
124124
}

examples/html-canvas/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build js
1+
//go:build js
22

33
package main
44

examples/html-canvas/serve.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !js
1+
//go:build !js
22

33
package main
44

examples/opengl/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build cgo
1+
//go:build cgo
22

33
package main
44

font/sfnt_cff.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (cff *cffTable) ToPath(p Pather, glyphID, ppem uint16, x0, y0, f float64, h
237237
b1 := int32(r.ReadUint8())
238238
v = (-(b0-251)*256 - b1 - 108) << 16
239239
} else {
240-
v = r.ReadInt32() // less-siginificant bits is fraction
240+
v = r.ReadInt32() // least-significant bits are fraction
241241
}
242242
if cff.version == 1 && 48 <= len(stack) || cff.version == 2 && 513 <= len(stack) {
243243
return fmt.Errorf("%v: too many operands for operator", table)

latex_bin.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build latex
1+
//go:build latex
22

33
package canvas
44

@@ -25,11 +25,12 @@ var tempDir = path.Join(os.TempDir(), "tdewolff-canvas")
2525

2626
// ParseLaTeX parses a LaTeX formatted string into a path. It requires latex and dvisvgm to be installed on the machine.
2727
// The content is surrounded by:
28-
// \documentclass{article}
29-
// \begin{document}
30-
// \thispagestyle{empty}
31-
// {{input}}
32-
// \end{document}
28+
//
29+
// \documentclass{article}
30+
// \begin{document}
31+
// \thispagestyle{empty}
32+
// {{input}}
33+
// \end{document}
3334
func ParseLaTeX(s string) (*Path, error) {
3435
if err := os.MkdirAll(tempDir, os.ModePerm); err != nil {
3536
panic(err)

latex_bin_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build latex
1+
//go:build latex
22

33
package canvas
44

renderers/htmlcanvas/htmlcanvas.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build js
1+
//go:build js
22

33
package htmlcanvas
44

renderers/opengl/opengl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build cgo
1+
//go:build cgo
22

33
package opengl
44

resources/preview/main.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// +build harfbuzz
2-
31
package main
42

53
import (

text/fribidi.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !fribidi js
1+
//go:build !fribidi || js
22

33
package text
44

text/fribidi_cgo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build fribidi,!js
1+
//go:build fribidi && !js
22

33
package text
44

text/harfbuzz.go

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build !harfbuzz || js
2-
// +build !harfbuzz js
32

43
package text
54

text/harfbuzz_cgo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build harfbuzz,!js
1+
//go:build harfbuzz && !js
22

33
package text
44

0 commit comments

Comments
 (0)