Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

check file is not a directory when returned as a file #214

Merged

Conversation

rickyshrestha
Copy link
Contributor

@rickyshrestha rickyshrestha commented Jun 28, 2019

fix for #203

"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"
Copy link
Member

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?

"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"
Copy link
Member

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?

@@ -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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this line

@@ -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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this line

@rickyshrestha
Copy link
Contributor Author

changes are now made on the latest version.

@markbates markbates merged commit 0e984b9 into gobuffalo:master Jun 28, 2019
@markbates
Copy link
Member

Thanks! I’ll do a release shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants