Skip to content

Commit

Permalink
cmd/present better error message
Browse files Browse the repository at this point in the history
Provide a better suggestion for how to fix the error when static files
cannot be loaded due to installing and running in module aware mode.

See: golang/go#43459
  • Loading branch information
packrat386 committed Jun 11, 2021
1 parent 13cf844 commit c3146f8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/present/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ static content by looking for a %q package
in your Go workspaces (GOPATH).
You may use the -base flag to specify an alternate location.
If you installed this binary in module-aware mode (which is default for
go versions 1.16 and above) then you may see the following error:
Couldn't find gopresent files: no required module provides package golang.org/x/tools/cmd/present
If so, need to specify the module path with the -base flag.
e.g. -base ~/go/pkg/mod/golang.org/x/[email protected]/cmd/present
`

const localhostWarning = `
Expand Down

0 comments on commit c3146f8

Please sign in to comment.