go-licenses: golang.org/x/sys and other packages don't seem to work
I’m walking through the dependencies in my go.mod and I find that the golang.org/x/ repositories give me trouble:
% go-licenses csv golang.org/x/sys
Error: errors for ["golang.org/x/sys"]:
golang.org/x/sys: -: module golang.org/x/sys@latest found (v0.0.0-20200420163511-1957bb5e6d1f), but does not contain package golang.org/x/sys
Usage:
licenses csv <package> [flags]
Flags:
--git_remote stringArray Remote Git repositories to try (default [origin,upstream])
-h, --help help for csv
Global Flags:
--alsologtostderr log to standard error as well as files
--confidence_threshold float Minimum confidence required in order to positively identify a license. (default 0.9)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
F0423 16:43:51.988116 851 main.go:43] errors for ["golang.org/x/sys"]:
golang.org/x/sys: -: module golang.org/x/sys@latest found (v0.0.0-20200420163511-1957bb5e6d1f), but does not contain package golang.org/x/sys
Is there a trick to this? Advice?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 15 (7 by maintainers)
The commands you ran do not relate to go licenses though.
Note golang.org/x/sys is not a go package, that’s why those commands failed. There are go packages with golang.org/x/sys as prefix.
Here is a repo showing this problem: https://github.com/dcormier/go-licenses (complete with the requested
go.mod
file)Here is the result of running the command in that repo: