Skip to content

Commit c05df61

Browse files
committed
Remove use of pretty dependency
It wasn't adding much to the formatting here, so let's remove it. We do lose the commas between struct fields, but that's fine.
1 parent 6379734 commit c05df61

4 files changed

Lines changed: 14 additions & 27 deletions

File tree

go/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Usage
1717

1818
```sh
1919
$ pdf2msgpack --font-info 0-example.pdf | p2m-reader
20-
2016/07/15 16:40:36 FileName: "0-example.pdf"
21-
2016/07/15 16:40:36 Pages: 4
22-
2016/07/15 16:40:36 Creator: "Microsoft® Office Word 2007"
23-
2016/07/15 16:40:36 Producer: "Microsoft® Office Word 2007"
24-
p2m.FontInfo{Name:"ABCDEE+Cambria,Bold", Type:"TrueType", Encoding:"WinAnsi", Embedded:true, Subset:true, ToUnicode:false}
25-
p2m.FontInfo{Name:"ABCDEE+Cambria", Type:"TrueType", Encoding:"WinAnsi", Embedded:true, Subset:true, ToUnicode:false}
26-
p2m.FontInfo{Name:"ABCDEE+Calibri", Type:"TrueType", Encoding:"WinAnsi", Embedded:true, Subset:true, ToUnicode:false}
27-
2016/07/15 16:40:36 Page i=1 s={595.4 841.8} len(paths)=4 len(glyphs)=34
28-
2016/07/15 16:40:36 Page i=2 s={595.4 841.8} len(paths)=238 len(glyphs)=300
29-
2016/07/15 16:40:36 Page i=3 s={595.4 841.8} len(paths)=237 len(glyphs)=301
30-
2016/07/15 16:40:36 Page i=4 s={595.4 841.8} len(paths)=237 len(glyphs)=306
20+
2025/09/15 16:54:06 FileName: "example.pdf"
21+
2025/09/15 16:54:06 Pages: 4
22+
2025/09/15 16:54:06 Creator: "Microsoft® Office Word 2007"
23+
2025/09/15 16:54:06 Producer: "Microsoft® Office Word 2007"
24+
2025/09/15 16:54:06 FontInfo: {Name:ABCDEE+Cambria,Bold Type:TrueType Encoding:WinAnsi Embedded:true Subset:true ToUnicode:false}
25+
2025/09/15 16:54:06 FontInfo: {Name:ABCDEE+Cambria Type:TrueType Encoding:WinAnsi Embedded:true Subset:true ToUnicode:false}
26+
2025/09/15 16:54:06 FontInfo: {Name:ABCDEE+Calibri Type:TrueType Encoding:WinAnsi Embedded:true Subset:true ToUnicode:false}
27+
2025/09/15 16:54:06 Page i=1 s={595.4 841.8} len(paths)=4 len(glyphs)=34
28+
2025/09/15 16:54:06 Page i=2 s={595.4 841.8} len(paths)=238 len(glyphs)=300
29+
2025/09/15 16:54:06 Page i=3 s={595.4 841.8} len(paths)=237 len(glyphs)=301
30+
2025/09/15 16:54:06 Page i=4 s={595.4 841.8} len(paths)=237 len(glyphs)=306
3131
```

go/cmd/p2m-reader/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
"log"
66
"os"
77

8-
"github.com/kr/pretty"
9-
108
"github.com/sensiblecodeio/pdf2msgpack/go/pkg/p2m"
119
)
1210

@@ -23,7 +21,7 @@ func main() {
2321

2422
if r.Meta.FontInfo != nil {
2523
for _, fi := range *r.Meta.FontInfo {
26-
pretty.Println(fi)
24+
log.Printf("FontInfo: %+v\n", fi)
2725
}
2826
}
2927

go/go.mod

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ module github.com/sensiblecodeio/pdf2msgpack/go
22

33
go 1.19
44

5-
require (
6-
github.com/kr/pretty v0.2.1
7-
github.com/tinylib/msgp v1.1.2
8-
)
5+
require github.com/tinylib/msgp v1.1.2
96

10-
require (
11-
github.com/kr/text v0.1.0 // indirect
12-
github.com/philhofer/fwd v1.0.0 // indirect
13-
)
7+
require github.com/philhofer/fwd v1.0.0 // indirect

go/go.sum

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
2-
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
3-
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
4-
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
5-
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
61
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
72
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
83
github.com/tinylib/msgp v1.1.2 h1:gWmO7n0Ys2RBEb7GPYB9Ujq8Mk5p2U08lRnmMcGy6BQ=

0 commit comments

Comments
 (0)