Skip to content

Commit 13499f2

Browse files
committed
Cleanup
1 parent ba46d4f commit 13499f2

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 4.0.0
1+
VERSION = 4.0.1
22

33
PACKAGES := $(shell go list -f {{.Dir}} ./...)
44
GOFILES := $(addsuffix /*.go,$(PACKAGES))

cmd/tj/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ type configuration struct {
4343
version string
4444
}
4545

46-
var config = configuration{}
46+
type printerFunc func(line *line) error
47+
48+
var (
49+
config = configuration{}
50+
printer printerFunc
51+
start *regexp.Regexp
52+
jsonTemplate *template.Template
53+
)
4754

4855
var timeFormats = map[string]string{
4956
"ANSIC": time.ANSIC,
@@ -63,10 +70,6 @@ var timeFormats = map[string]string{
6370
"StampNano": time.StampNano,
6471
}
6572

66-
type printerFunc func(line *line) error
67-
68-
var printer printerFunc
69-
7073
func jsonPrinter() printerFunc {
7174
enc := json.NewEncoder(os.Stdout)
7275
return func(line *line) error {
@@ -93,9 +96,6 @@ func timeFormatsHelp() string {
9396
return buf.String()
9497
}
9598

96-
var start *regexp.Regexp
97-
var jsonTemplate *template.Template
98-
9999
func init() {
100100
flag.StringVar(&config.template, "template", "", "go template (https://golang.org/pkg/text/template)")
101101
flag.StringVar(&config.timeFormat, "timeformat", "RFC3339", timeFormatsHelp())

0 commit comments

Comments
 (0)