summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-08-26 19:25:41 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-08-26 19:25:41 +0200
commit0e4b23e79b8fe4f77771b996799b40b5d118d04e (patch)
tree1390fd00680ae9c599bf046e810f447e631e4b39
parentdfcbec8ec9e41727d3fd24259f0a699f10b08620 (diff)
strip randHEADmaster
-rw-r--r--cmd/theo/main.go11
-rw-r--r--go.mod1
-rw-r--r--theo.go17
3 files changed, 4 insertions, 25 deletions
diff --git a/cmd/theo/main.go b/cmd/theo/main.go
deleted file mode 100644
index 12ec5e4..0000000
--- a/cmd/theo/main.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package main
-
-import (
- "fmt"
-
- "dim13.org/theo"
-)
-
-func main() {
- fmt.Println(theo.Random())
-}
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..98995a2
--- /dev/null
+++ b/go.mod
@@ -0,0 +1 @@
+module dim13.org/theo
diff --git a/theo.go b/theo.go
index 09325da..6911dc8 100644
--- a/theo.go
+++ b/theo.go
@@ -1,15 +1,10 @@
// $OpenBSD: theo.c,v 1.143 2014/11/19 21:22:47 schwarze Exp $
// Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
-// Package theo implements random quotes from Theo De Raadt
-package theo
-
+// Package theo holds random quotes from Theo De Raadt
+//
// source: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mg/theo.c
-
-import (
- "math/rand"
- "time"
-)
+package theo
// Quotes from Theo
var Quotes = []string{
@@ -127,9 +122,3 @@ var Quotes = []string{
`Well finally everyone can see that the shit is really shitty.`,
`All that complexity stopped us from getting flying cars by today.`,
}
-
-// Random quote
-func Random() string {
- rand.Seed(time.Now().UnixNano())
- return Quotes[rand.Intn(len(Quotes))]
-}