-
-
Notifications
You must be signed in to change notification settings - Fork 196
check file is not a directory when returned as a file #214
check file is not a directory when returned as a file #214
Conversation
v2/jam/parser/finder.go
Outdated
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx" | ||
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer" | ||
"github.com/markbates/oncer" | ||
"github.com/pkg/errors" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Th pkg/errors package has recently been removed from packr, can you please remove its use?
v2/jam/parser/finder.go
Outdated
"path/filepath" | ||
"strings" | ||
"time" | ||
|
||
"github.com/gobuffalo/packr/v2/plog" | ||
"github.com/karrick/godirwalk" | ||
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/errx" | ||
"github.com/gobuffalo/packr/v2/internal/takeon/github.com/markbates/oncer" | ||
"github.com/markbates/oncer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert back to using the internal packages and not their external paths?
v2/jam/parser/finder.go
Outdated
@@ -52,7 +64,7 @@ func (fd *finder) findAllGoFilesImports(dir string) ([]string, error) { | |||
ctx := build.Default | |||
|
|||
if len(ctx.SrcDirs()) == 0 { | |||
err = fmt.Errorf("no src directories found") | |||
err = errors.New("no src directories found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this line
v2/jam/parser/finder.go
Outdated
@@ -63,7 +75,7 @@ func (fd *finder) findAllGoFilesImports(dir string) ([]string, error) { | |||
|
|||
if err != nil { | |||
if !strings.Contains(err.Error(), "cannot find package") { | |||
if _, ok := errx.Unwrap(err).(*build.NoGoError); !ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this line
changes are now made on the latest version. |
Thanks! I’ll do a release shortly. |
fix for #203