cmd/*: refactor get flag value (#24761)

This commit is contained in:
s7v7nislands
2022-04-26 09:32:31 +02:00
committed by GitHub
parent 0914234d10
commit 195c2d3d69
5 changed files with 87 additions and 59 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ It is possible to refer to a file containing the message.`,
}
func getMessage(ctx *cli.Context, msgarg int) []byte {
if file := ctx.String("msgfile"); file != "" {
if file := ctx.String(msgfileFlag.Name); file != "" {
if len(ctx.Args()) > msgarg {
utils.Fatalf("Can't use --msgfile and message argument at the same time.")
}