kevinburke: add quote generator from "The Wire"

Are you taking notes on a criminal conspiracy?

Change-Id: I1936e2dbe90634817f1aedabcba3c2b9f94e401b
Reviewed-on: https://go-review.googlesource.com/103869
Reviewed-by: Kevin Burke <kev@inburke.com>
This commit is contained in:
Kevin Burke 2018-04-01 15:41:55 -07:00
Родитель 58b1932f1a
Коммит 115154e7b5
1 изменённых файлов: 28 добавлений и 0 удалений

28
kevinburke/main.go Normal file
Просмотреть файл

@ -0,0 +1,28 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"crypto/rand"
"fmt"
"math/big"
mrand "math/rand"
)
var quotes = []string{
"This heres a gun powder activated, 27 caliber, full auto, no kickback, nail-throwing mayhem man",
"You come at the king, you best not miss.",
"A life. A life, Jimmy, you know what that is? It's the stuff that happens while you're waiting for moments that never come.",
}
func main() {
n, err := rand.Int(rand.Reader, big.NewInt(2<<32-1))
if err != nil {
panic(err)
}
r := mrand.New(mrand.NewSource(n.Int64()))
choice := r.Intn(len(quotes))
fmt.Println(quotes[choice])
}