You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.
Thanks @markbates for creating this library. It makes our lives easier! 💙
Version v0.17.1
info, err=pkger.Stat("/idontexist")
When I run this,
in local filesystem fallback mode (without pkged.go), I get a *os.PathError with syscall.ENOENT as underlying cause (os.IsNotExist returns true)
with pkged.go at compile time, I get a *errors.errorString saying could not stat github.com/myself/myproject:/idontexist
I feel like using os.IsNotExist is a standard way to find the root cause and handle it appropriately, for example return status code 404 instead of 500.
Thanks @markbates for creating this library. It makes our lives easier! 💙
Version v0.17.1
When I run this,
pkged.go
), I get a*os.PathError
withsyscall.ENOENT
as underlying cause (os.IsNotExist
returns true)pkged.go
at compile time, I get a*errors.errorString
sayingcould not stat github.com/myself/myproject:/idontexist
I feel like using
os.IsNotExist
is a standard way to find the root cause and handle it appropriately, for example return status code 404 instead of 500.The code in question is in
mem.go
.The text was updated successfully, but these errors were encountered: