Skip to content

Commit

Permalink
adding for loop for marking required flags on sign
Browse files Browse the repository at this point in the history
Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
  • Loading branch information
ChaosInTheCRD committed Jan 9, 2024
1 parent 273c249 commit 608c958
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions options/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ func (so *SignOptions) AddFlags(cmd *cobra.Command) {
cmd.Flags().StringVarP(&so.OutFilePath, "outfile", "o", "", "File to write signed data. Defaults to stdout")
cmd.Flags().StringVarP(&so.InFilePath, "infile", "f", "", "Witness policy file to sign")
cmd.Flags().StringSliceVar(&so.TimestampServers, "timestamp-servers", []string{}, "Timestamp Authority Servers to use when signing envelope")

for _, flag := range RequiredSignFlags {
cmd.MarkFlagRequired(flag)

Check failure on line 41 in options/sign.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)
}
}

0 comments on commit 608c958

Please sign in to comment.