From 6a10761b5058c500fcb377db16d2e7901af35e74 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Thu, 19 Oct 2017 18:14:37 +0200 Subject: [PATCH 1/2] Remove GetTabWriter from tsdb package --- cmd/tsdb/main.go | 3 ++- tabwriter.go | 18 ------------------ 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 tabwriter.go diff --git a/cmd/tsdb/main.go b/cmd/tsdb/main.go index 146aac08a..0278c14c5 100644 --- a/cmd/tsdb/main.go +++ b/cmd/tsdb/main.go @@ -23,6 +23,7 @@ import ( "runtime" "runtime/pprof" "sync" + "text/tabwriter" "time" "unsafe" @@ -333,7 +334,7 @@ func exitWithError(err error) { } func printBlocks(blocks []*tsdb.Block) { - tw := tsdb.GetNewTabWriter(os.Stdout) + tw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) defer tw.Flush() fmt.Fprintln(tw, "BLOCK ULID\tMIN TIME\tMAX TIME\tNUM SAMPLES\tNUM CHUNKS\tNUM SERIES") diff --git a/tabwriter.go b/tabwriter.go deleted file mode 100644 index 8e84a9c67..000000000 --- a/tabwriter.go +++ /dev/null @@ -1,18 +0,0 @@ -package tsdb - -import ( - "io" - "text/tabwriter" -) - -const ( - minwidth = 0 - tabwidth = 0 - padding = 2 - padchar = ' ' - flags = 0 -) - -func GetNewTabWriter(output io.Writer) *tabwriter.Writer { - return tabwriter.NewWriter(output, minwidth, tabwidth, padding, padchar, flags) -} From e59b7b8ac46773c0735d0d41d00d4339a742b6a5 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Thu, 19 Oct 2017 18:24:12 +0200 Subject: [PATCH 2/2] Remove prometheus/prometheus dev-2.0 branch workaround --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8858c67f4..4bd6576f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,6 @@ go: go_import_path: github.com/prometheus/tsdb -install: -# Hack until the dev-2.0 branch becomes master. -- go get -d github.com/prometheus/prometheus/... -- (cd $GOPATH/src/github.com/prometheus/prometheus && git checkout dev-2.0) -- go get -t ./... - script: - go test -timeout 5m ./...