Skip to content

Commit

Permalink
add verbose log entry for deprecated cli flag
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstanley committed Aug 17, 2021
1 parent 7b35a50 commit 3484702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (
)

func main() {
var inputFiles string
var xxxTags string
var inputFiles, xxxTags string
flag.StringVar(&inputFiles, "input", "", "pattern to match input file(s)")
flag.StringVar(&xxxTags, "XXX_skip", "", "tags that should be skipped (applies 'tag:\"-\"') for unknown fields (deprecated since protoc-gen-go v1.4.0)")
flag.BoolVar(&verbose, "verbose", false, "verbose logging")
flag.Parse()

var xxxSkipSlice []string
if len(xxxTags) > 0 {
logf("warn: deprecated flag '-XXX_skip' used")
xxxSkipSlice = strings.Split(xxxTags, ",")
}

Expand Down

0 comments on commit 3484702

Please sign in to comment.