commit 5a36bec0ba30464e1149c35a74cb845fb1274de9
parent 1903a09e9773e485208f57e5fc92ecf65a693cbb
Author: NunoSempere <nuno.sempere@protonmail.com>
Date: Fri, 16 Feb 2024 00:19:09 +0100
initialize go program
Diffstat:
4 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/go/hello.go b/go/hello.go
@@ -0,0 +1,7 @@
+package main
+
+import "fmt"
+
+func main() {
+ fmt.Println("Hello world!")
+}
diff --git a/go/makefile b/go/makefile
@@ -0,0 +1,2 @@
+run:
+ go run hello.go
diff --git a/go/notes.md b/go/notes.md
@@ -0,0 +1,3 @@
+- [ ] Hello world program
+- [ ] Look into randomness sources in go
+- [ ]
diff --git a/go/squiggle.go b/go/squiggle.go
@@ -0,0 +1,10 @@
+package main
+
+import "fmt"
+import rand "math/rand/v2"
+
+func main() {
+ r := rand.New(rand.NewPCG(1, 2))
+ fmt.Println("Hello world!")
+ fmt.Printf("%v\n", r.Float64())
+}