1
0
mirror of https://github.com/golang/go synced 2024-11-24 16:20:13 -07:00

cmd/go: remove unnecessary Stat in go work use

This commit is contained in:
Filippo Rossi 2022-04-01 22:20:39 +02:00
parent 994d84eeb6
commit 86a263747e
No known key found for this signature in database
GPG Key ID: 170D27E03F4DE09E

View File

@ -125,11 +125,7 @@ func runUse(ctx context.Context, cmd *base.Command, args []string) {
} }
if !*useR { if !*useR {
if target, err := fsys.Stat(useDir); err == nil && !target.IsDir() {
base.Errorf(`go: argument "%s" is not a directory`, useDir)
} else {
lookDir(useDir) lookDir(useDir)
}
continue continue
} }