From 426ade6c8bdab243da719e369a887284368179bb Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sun, 4 Apr 2021 11:52:03 +0200 Subject: import: go: Replace underscores with hyphens in package names. As per section '16.4.2 Package Naming' in the manual, use hypens instead of underscores in package names. * guix/import/go.scm (go-module->guix-package-name): Replace underscores with hyphens. Signed-off-by: Leo Famulari --- guix/import/go.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'guix') diff --git a/guix/import/go.scm b/guix/import/go.scm index 7452b4c903..6c0231e113 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2021 François Joulaud ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -380,9 +381,11 @@ (define (go-module->guix-package-name module-path) "Converts a module's path to the canonical Guix format for Go packages." (string-downcase (string-append "go-" (string-replace-substring (string-replace-substring - module-path - "." "-") - "/" "-")))) + (string-replace-substring + module-path + "." "-") + "/" "-") + "_" "-")))) (define-record-type (make-module-meta import-prefix vcs repo-root) -- cgit v1.2.3