summary refs log tree commit diff
diff options
context:
space:
mode:
authorSarah Morgensen <iskarian@mgsn.dev>2021-09-28 19:49:58 -0700
committerLudovic Courtès <ludo@gnu.org>2021-10-04 16:36:59 +0200
commitac43ead7741357cb620d6a0eb80ae754851b8fa1 (patch)
treea605eb37b1a0c04d99381c12729efd96e6302859
parentf666b9b478a306314f426c0ee93a7ebb91f6f60f (diff)
downloadguix-ac43ead7741357cb620d6a0eb80ae754851b8fa1.tar.gz
import: go: Handle extra whitespace in "go-import" meta tags.
Some packages sites use extra whitespace in the content portion of <meta
name="go-import" ...> tags, so handle that.  Example:
<https://k8s.io/api?go-get=1>

* guix/import/go.scm (fetch-module-meta-data)[go-import->module-meta]:
Use 'string-tokenize' instead of 'string-split'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/import/go.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/import/go.scm b/guix/import/go.scm
index 9769b557ae..ca909ab35a 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -474,7 +474,7 @@ Optionally include a VERSION string to append to the name."
 because goproxy servers don't currently provide all the information needed to
 build a package."
   (define (go-import->module-meta content-text)
-    (match (string-split content-text #\space)
+    (match (string-tokenize content-text char-set:graphic)
       ((root-path vcs repo-url)
        (make-module-meta root-path (string->symbol vcs)
                          (strip-.git-suffix/maybe repo-url)))))