Merge pull request #179 from prometheus/tabw

Remove GetTabWriter from tsdb package
This commit is contained in:
Fabian Reinartz 2017-10-20 08:51:07 +02:00 committed by GitHub
commit ebdc0f4a61
3 changed files with 2 additions and 25 deletions

View File

@ -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 ./...

View File

@ -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")

View File

@ -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)
}