mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Remove GetTabWriter from tsdb package
This commit is contained in:
parent
7f8fa07cf7
commit
6a10761b50
|
@ -23,6 +23,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"sync"
|
"sync"
|
||||||
|
"text/tabwriter"
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
@ -333,7 +334,7 @@ func exitWithError(err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func printBlocks(blocks []*tsdb.Block) {
|
func printBlocks(blocks []*tsdb.Block) {
|
||||||
tw := tsdb.GetNewTabWriter(os.Stdout)
|
tw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
|
||||||
defer tw.Flush()
|
defer tw.Flush()
|
||||||
|
|
||||||
fmt.Fprintln(tw, "BLOCK ULID\tMIN TIME\tMAX TIME\tNUM SAMPLES\tNUM CHUNKS\tNUM SERIES")
|
fmt.Fprintln(tw, "BLOCK ULID\tMIN TIME\tMAX TIME\tNUM SAMPLES\tNUM CHUNKS\tNUM SERIES")
|
||||||
|
|
18
tabwriter.go
18
tabwriter.go
|
@ -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)
|
|
||||||
}
|
|
Loading…
Reference in a new issue