Adds a --call flag as an alias to the --print flag and hides the later.

Signed-off-by: Talon Bowler <talon.bowler@docker.com>
This commit is contained in:
Talon Bowler
2024-05-30 13:41:04 -07:00
committed by Tonis Tiigi
parent 5afb210d43
commit 250cd44d70
4 changed files with 16 additions and 7 deletions

View File

@@ -13,6 +13,14 @@ func ParsePrintFunc(str string) (*controllerapi.PrintFunc, error) {
if str == "" {
return nil, nil
}
// "check" has been added as an alias for "lint",
// in order to maintain backwards compatibility
// we need to convert it.
if str == "check" {
str = "lint"
}
csvReader := csv.NewReader(strings.NewReader(str))
fields, err := csvReader.Read()
if err != nil {