diff mbox series

[bug#54560,11/47] gnu: Add go-github-com-josharian-intern.

Message ID 20220325133211.5128-11-hello@lnikki.la
State New
Headers show
Series [bug#54560,01/47] gnu: Add go-google-golang-org-protobuf. | expand

Commit Message

Leo Nikkilä March 25, 2022, 1:31 p.m. UTC
* gnu/packages/golang.scm (go-github-com-josharian-intern): New
variable.
---
 gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

M March 25, 2022, 7:40 p.m. UTC | #1
Leo Nikkilä schreef op vr 25-03-2022 om 15:31 [+0200]:
> +    (synopsis "Intern Go strings")

This is a rather confusing synopsis.  If these strings are internal to
Go, why aren't they part of the 'go' package?  I know that's not what
is meant here, but I'd recommend a different description ...
M March 25, 2022, 7:41 p.m. UTC | #2
Leo Nikkilä schreef op vr 25-03-2022 om 15:31 [+0200]:
> All functions may be called concurrently with themselves
> +and each other.

Can be simplified a bit:

  This package is thread-safe.
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a46a6f955b..a9286f8b8a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9942,6 +9942,31 @@  (define-public go-github-com-go-stack-stack
     (home-page "https://github.com/go-stack/stack")
     (license license:expat)))
 
+(define-public go-github-com-josharian-intern
+  (package
+    (name "go-github-com-josharian-intern")
+    (version "1.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/josharian/intern")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1za48ppvwd5vg8vv25ldmwz1biwpb3p6qhf8vazhsfdg9m07951c"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/josharian/intern"))
+    (synopsis "Intern Go strings")
+    (description
+     "Package intern interns strings.  Interning is best effort only.
+Interned strings may be removed automatically at any time without
+notification.  All functions may be called concurrently with themselves
+and each other.")
+    (home-page "https://github.com/josharian/intern")
+    (license license:expat)))
+
 (define-public go-google-golang-org-protobuf
   (package
     (name "go-google-golang-org-protobuf")