google / go-licenses

A lightweight tool to report on the licenses used by a Go package and its dependencies. Highlight! Versioned external URL to licenses can be found at the same time.
Apache License 2.0
833 stars 125 forks source link

Export local license paths #144

Closed dschmidt closed 1 year ago

dschmidt commented 2 years ago

Hey

as mentioned in another ticket I'm creating a licenses page in my web app. I would like to link the licenses I dumped with the save command instead of relying on the online link.

For example I basically need to link to webroot/licenses_backend/github.com/cpuguy83/go-md2man/v2/md2man/LICENSE.md for github.com/cpuguy83/go-md2man/v2/md2man,https://github.com/cpuguy83/go-md2man/blob/v2.0.2/LICENSE.md,MIT

I could now try to do some string magic and extract LICENSE.md from the URL and concatenate it with the package url, but that seems like a very brittle solution. Could you make github.com/cpuguy83/go-md2man/v2/md2man/LICENSE.md to the templates?

Bobgy commented 2 years ago

Similarly, welcome contribution on this!

gwatts commented 1 year ago

@dschmidt I had a similar issue.. does #179 do what you need?