From a5a4ec01a8e0ad7ade755ed71eebd8e59d15b91e Mon Sep 17 00:00:00 2001 From: William Banfield Date: Mon, 9 May 2022 18:06:07 -0400 Subject: [PATCH] remove unused dir flag --- scripts/metricsgen/metricsgen.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/metricsgen/metricsgen.go b/scripts/metricsgen/metricsgen.go index c4a4fc59e..70cb36a77 100644 --- a/scripts/metricsgen/metricsgen.go +++ b/scripts/metricsgen/metricsgen.go @@ -26,10 +26,10 @@ import ( func init() { flag.Usage = func() { - fmt.Fprintf(os.Stderr, `Usage: %[1]s -dir -struct + fmt.Fprintf(os.Stderr, `Usage: %[1]s -struct -Generate constructors for the metrics type contained in the specified -dir -Go directory. The tool creates a new file in the same directory as the specified directory +Generate constructors for the metrics type specified by -struct contained in +the current directory. The tool creates a new file in the current directory containing the generated code. Options: @@ -131,10 +131,7 @@ func main() { if *strct == "" { log.Fatal("You must specify a non-empty -struct") } - if *dir == "" { - log.Fatal("You must specify a non-empty -dir") - } - td, err := ParseMetricsDir(*dir, *strct) + td, err := ParseMetricsDir(".", *strct) if err != nil { log.Fatalf("Parsing file: %v", err) }