Skip to content

Commit d6f448a

Browse files
committed
use errors.HasType
1 parent a8a6336 commit d6f448a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/src/cmd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"context"
5-
stderrors "errors"
65
"flag"
76
"fmt"
87
"log"
@@ -136,7 +135,7 @@ func runMigrated(flagSet *flag.FlagSet) (int, error) {
136135
args := append([]string{"src"}, flagSet.Args()...)
137136

138137
err := migratedRootCommand().Run(ctx, args)
139-
if _, ok := stderrors.AsType[*cmderrors.UsageError](err); ok {
138+
if errors.HasType[*cmderrors.UsageError](err) {
140139
return 2, nil
141140
}
142141
var exitErr cli.ExitCoder

0 commit comments

Comments
 (0)