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:
parent
994d84eeb6
commit
86a263747e
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user