guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/09: import: go: Handle extra whitespace in "go-import" meta tags.


From: guix-commits
Subject: 05/09: import: go: Handle extra whitespace in "go-import" meta tags.
Date: Mon, 4 Oct 2021 10:39:38 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit ac43ead7741357cb620d6a0eb80ae754851b8fa1
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Tue Sep 28 19:49:58 2021 -0700

    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>
---
 guix/import/go.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 9769b55..ca909ab 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)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]