diff --git a/cmd/tsdb/main.go b/cmd/tsdb/main.go index 146aac08ac..0278c14c52 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 8e84a9c67a..0000000000 --- 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) -}