We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f7a5201 + 20df76b commit 1001d36Copy full SHA for 1001d36
pkg/plugins/golang/v3/init.go
@@ -17,7 +17,6 @@ limitations under the License.
17
package v3
18
19
import (
20
- "errors"
21
"fmt"
22
"os"
23
"path/filepath"
@@ -186,7 +185,9 @@ func checkDir() error {
186
185
return err
187
}
188
if info.Name() != "go.mod" && !strings.HasPrefix(info.Name(), ".") {
189
- return errors.New("only the go.mod and files with the prefix \"(.)\" are allowed before the init")
+ return fmt.Errorf(
+ "target directory is not empty (only go.mod and files with the prefix \".\" are allowed); found existing file %q",
190
+ path)
191
192
return nil
193
})
0 commit comments