remove unused dir flag

This commit is contained in:
William Banfield
2022-05-09 18:06:07 -04:00
parent 410a7023c0
commit a5a4ec01a8
+4 -7
View File
@@ -26,10 +26,10 @@ import (
func init() {
flag.Usage = func() {
fmt.Fprintf(os.Stderr, `Usage: %[1]s -dir <dir> -struct <struct>
fmt.Fprintf(os.Stderr, `Usage: %[1]s -struct <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)
}