import: go: Improve synopsis and description parsing.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Mon, 22 Mar 2021 03:53:21 +0000 (23:53 -0400)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Sat, 10 Apr 2021 02:41:31 +0000 (22:41 -0400)
commit6aee902eaf9e38d5f41f568ef787fa0cc5203318
tree706c5c64d6a3796a85bef9c99e0d80126408ef2f
parent2446a112dfb79e851449b832006c1160bf818504
import: go: Improve synopsis and description parsing.

* guix/import/go.scm (%strict-tokenizer?): Set parameter to #t.
(go-path-escape): Redefine to prevent inlining.
(http-get*): Replace by ...
(http-fetch*): this ...
(json-fetch*): New procedure.
(go.pkg.dev-info): Use http-fetch*.
(go-package-licenses): Rewrite in terms of go.pkg.dev-info.
(go-package-description): Likewise.
(go-package-synopsis): Likewise.
(fetch-go.mod): Use the memoized http-fetch*.
(parse-go.mod): Adjust to receive content as a string.
(fetch-module-meta-data): Adjust to use http-fetch*.
(go-module->guix-package): Adjust to the modified fetch-go.mod return value.
[inputs]: Use propagated inputs, which is the most common situations for Go
libraries.
[description]: Beautify description.
[licenses]: Do no check for #f.  The result of the license parsing is always a
list.
* tests/go.scm: Adjust following above changes.
guix/import/go.scm
guix/import/utils.scm
tests/go.scm