diff --git a/src/cmd/go/internal/workcmd/use.go b/src/cmd/go/internal/workcmd/use.go index 4a60917b20f..6da64b3f09e 100644 --- a/src/cmd/go/internal/workcmd/use.go +++ b/src/cmd/go/internal/workcmd/use.go @@ -125,11 +125,7 @@ func runUse(ctx context.Context, cmd *base.Command, args []string) { } 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 }