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.
pkged.go is at the root of the module and from cmd/blog/main.go I am calling pkger.Dir(/dist) which I pass to a custom filesystem http handler. It works perfectly when I run the binary ./bin/blog from this module/package but if I move it somewhere else like my home directory everything breaks apart.
This is the error I'm getting when I try to visit localhost:8080:
exit status 1: go: cannot find main module; see 'go help modules'
I have tried all kinds of workarounds including pkger -o cmd/blog but nothing seems to work. What is the proper way to do this, does it revolve around relative paths absolute paths like "github.com/my_name/my_project:dist"
The text was updated successfully, but these errors were encountered:
I have roughly the following structure on my project:
pkged.go
is at the root of the module and fromcmd/blog/main.go
I am callingpkger.Dir(/dist)
which I pass to a custom filesystem http handler. It works perfectly when I run the binary./bin/blog
from this module/package but if I move it somewhere else like my home directory everything breaks apart.This is the error I'm getting when I try to visit localhost:8080:
I have tried all kinds of workarounds including
pkger -o cmd/blog
but nothing seems to work. What is the proper way to do this, does it revolve around relative paths absolute paths like"github.com/my_name/my_project:dist"
The text was updated successfully, but these errors were encountered: