Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sgreben committed Jan 26, 2018
1 parent ba46d4f commit 13499f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 4.0.0
VERSION = 4.0.1

PACKAGES := $(shell go list -f {{.Dir}} ./...)
GOFILES := $(addsuffix /*.go,$(PACKAGES))
Expand Down
16 changes: 8 additions & 8 deletions cmd/tj/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ type configuration struct {
version string
}

var config = configuration{}
type printerFunc func(line *line) error

var (
config = configuration{}
printer printerFunc
start *regexp.Regexp
jsonTemplate *template.Template
)

var timeFormats = map[string]string{
"ANSIC": time.ANSIC,
Expand All @@ -63,10 +70,6 @@ var timeFormats = map[string]string{
"StampNano": time.StampNano,
}

type printerFunc func(line *line) error

var printer printerFunc

func jsonPrinter() printerFunc {
enc := json.NewEncoder(os.Stdout)
return func(line *line) error {
Expand All @@ -93,9 +96,6 @@ func timeFormatsHelp() string {
return buf.String()
}

var start *regexp.Regexp
var jsonTemplate *template.Template

func init() {
flag.StringVar(&config.template, "template", "", "go template (https://golang.org/pkg/text/template)")
flag.StringVar(&config.timeFormat, "timeformat", "RFC3339", timeFormatsHelp())
Expand Down

0 comments on commit 13499f2

Please sign in to comment.