Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no error handling in filepath.Walk #5

Open
nakamura244 opened this issue Jul 24, 2019 · 2 comments
Open

There is no error handling in filepath.Walk #5

nakamura244 opened this issue Jul 24, 2019 · 2 comments

Comments

@nakamura244
Copy link

Hi @roblaszczak

It is a good analysis tool. And I use it.

If the path set in the argument is wrong (no such file or directory), a runtime error will occur.

So I think I should do error handling of no such file or directory

Thank you.

@Feresey
Copy link

Feresey commented Mar 5, 2020

изображение

@gpomykala
Copy link

gpomykala commented Jun 11, 2021

yep, similar error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10dd13a]

goroutine 1 [running]:
github.com/roblaszczak/go-cleanarch/cleanarch.(*Validator).Validate.func1(0xc00001e180, 0x40, 0x0, 0x0, 0x11371c8, 0xc00006e2a0, 0x11cb500, 0xc000104000)
        /Users/gpom/go/pkg/mod/github.com/roblaszczak/[email protected]/cleanarch/cleanarch.go:68 +0x5a
path/filepath.Walk(0xc00001e180, 0x40, 0xc00006ab28, 0x10ae2b1, 0xc000070dd0)
        /usr/local/Cellar/go/1.16.3/libexec/src/path/filepath/path.go:499 +0x7e
github.com/roblaszczak/go-cleanarch/cleanarch.(*Validator).Validate(0xc00006ac58, 0xc00001e180, 0x40, 0x0, 0x11fffd0, 0x0, 0x0, 0x56, 0x0, 0x0, ...)
        /Users/gpom/go/pkg/mod/github.com/roblaszczak/[email protected]/cleanarch/cleanarch.go:67 +0xcb
main.main()
        /Users/gpom/go/pkg/mod/github.com/roblaszczak/[email protected]/main.go:61 +0x696

FYI i did use it with common go tool path go-cleanarch ./... before realizing the usage is just go-cleanarch for current dir

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

No branches or pull requests

3 participants