licenseclassifier icon indicating copy to clipboard operation
licenseclassifier copied to clipboard

Update embed.go

Open dndn10 opened this issue 2 years ago • 1 comments

Fixed comment to work when using go get command

Currently when using go get -u github.com/google/licenseclassifier/... I get the following error:

/opt/gocode/pkg/mod/github.com/google/[email protected]/licenses/embed.go:8:12: pattern *.db: no matching files found /opt/gocode/pkg/mod/github.com/google/[email protected]/licenses/embed.go:8:12: pattern *.db: no matching files found

But when I changed ( locally ) the attached change it seems to work.

Env: Ubuntu 16 with Go 16.15 installed

dndn10 avatar Jul 18 '22 14:07 dndn10

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jul 18 '22 14:07 google-cla[bot]

This change might be incorrect, the examples on how to use embed all show //go:embed over // go:embed: https://pkg.go.dev/embed

license.ReadLicenseDir() is returning an empty list for me: perhaps adding that space simply removed the special meaning of the comment, but resulted in nothing being embedded.

dbolkensteyn avatar Oct 30 '22 11:10 dbolkensteyn

There is no *.db file in this folder: https://github.com/google/licenseclassifier/tree/main/licenses

So the error message was correct, and the right fix is more to remove *.db as an embedding rather than disabling it altogether.

dbolkensteyn avatar Oct 30 '22 11:10 dbolkensteyn