mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
5705f4b6d1
This should simplify debugging. Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1695
16 lines
249 B
Go
16 lines
249 B
Go
package flagutil
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
// WriteFlags writes all the explicitly set flags to w.
|
|
func WriteFlags(w io.Writer) {
|
|
flag.Visit(func(f *flag.Flag) {
|
|
value := f.Value.String()
|
|
fmt.Fprintf(w, "-%s=%q\n", f.Name, value)
|
|
})
|
|
}
|