Skip to content

Commit 40e13a1

Browse files
committed
Cleanup with goimports
1 parent e76ff04 commit 40e13a1

15 files changed

+712
-712
lines changed

codegen/codegen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"io/ioutil"
66
"os"
7-
"text/template"
7+
"text/template"
88
)
99

1010
func must(err error) {

index/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package index
33
import (
44
"errors"
55
"fmt"
6+
67
"github.com/dunhamsteve/iwork/proto/TSA"
78
"github.com/dunhamsteve/iwork/proto/TSCE"
89
"github.com/dunhamsteve/iwork/proto/TSCH"

index/pages.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package index
33
import (
44
"errors"
55
"fmt"
6+
67
"github.com/dunhamsteve/iwork/proto/TP"
78

89
"code.google.com/p/goprotobuf/proto"

pages2html/pages2html.go

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import (
44
"encoding/json"
55
"fmt"
66
"io/ioutil"
7-
"github.com/dunhamsteve/iwork/proto/TP"
8-
"github.com/dunhamsteve/iwork/proto/TSWP"
9-
"github.com/dunhamsteve/iwork/index"
107
"log"
118
"os"
129

10+
"github.com/dunhamsteve/iwork/index"
11+
"github.com/dunhamsteve/iwork/proto/TP"
12+
"github.com/dunhamsteve/iwork/proto/TSWP"
13+
1314
"golang.org/x/net/html"
1415
)
1516

16-
1717
// Helper function for building html text nodes
1818
func T(value string) *html.Node {
1919
return &html.Node{Type: html.TextNode, Data: value}
@@ -44,16 +44,16 @@ func E(tag string, children ...interface{}) *html.Node {
4444
}
4545

4646
func main() {
47-
if len(os.Args) < 3 {
48-
fmt.Printf(`Converts pages files to html
47+
if len(os.Args) < 3 {
48+
fmt.Printf(`Converts pages files to html
4949
5050
Usage:
5151
%s infile.pages outfile.html
5252
5353
`, os.Args[0])
54-
return
55-
}
56-
54+
return
55+
}
56+
5757
fmt.Println("Processing", os.Args[1])
5858
ix, err := index.Open(os.Args[1])
5959
must(err)
@@ -65,10 +65,10 @@ Usage:
6565
// This has most of what we want, aside from the actual style definitions.
6666
bs := ix.Deref(da.BodyStorage).(*TSWP.StorageArchive)
6767
texts := bs.Text
68-
69-
if len(texts) != 1 {
70-
log.Printf("WARNING - Expecting exactly one text, got %d", len(texts))
71-
}
68+
69+
if len(texts) != 1 {
70+
log.Printf("WARNING - Expecting exactly one text, got %d", len(texts))
71+
}
7272
text := texts[0]
7373

7474
// Offsets are in terms of unicode runes, so we have to convert to runes
@@ -82,18 +82,16 @@ Usage:
8282

8383
// <span> <em> and <b>
8484
charStyles := bs.TableCharStyle.Entries
85-
86-
85+
8786
// bs.TableListStyle - seems to change on headings, look into it.
88-
89-
90-
// Root of output document
91-
head, body := E("head", "\n"), E("body", "\n")
87+
88+
// Root of output document
89+
head, body := E("head", "\n"), E("body", "\n")
9290
doc := E("html", head, "\n", body)
9391

9492
var className string
95-
96-
// build paragraphs
93+
94+
// build paragraphs
9795
for i, e := range parStyles {
9896
pos := *e.CharacterIndex
9997
end := uint32(len(rr))
@@ -172,7 +170,7 @@ Usage:
172170
fmt.Println("Writing", os.Args[2])
173171
html.Render(w, doc)
174172
} else {
175-
// html.Render(os.Stdout, doc)
173+
// html.Render(os.Stdout, doc)
176174
}
177175
}
178176

proto/TP/TPArchives.pb.go

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/TP/TPCommandArchives.pb.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)