From ff5a3bb6cedb0c04fed7bc37b059f39671a150cb Mon Sep 17 00:00:00 2001 From: Connor McGuinness Date: Sat, 15 Jul 2017 21:08:42 +0100 Subject: [PATCH] cmcguinness: added main.go for gophercon 2017 contrib tutorial Change-Id: I237fb6efce29e70019c6e92b1f7e8d37ec9c6607 Reviewed-on: https://go-review.googlesource.com/48756 Reviewed-by: Bryan Mills --- cmcguinness/main.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cmcguinness/main.go diff --git a/cmcguinness/main.go b/cmcguinness/main.go new file mode 100644 index 0000000..830a3b3 --- /dev/null +++ b/cmcguinness/main.go @@ -0,0 +1,17 @@ +// Copyright 2017 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. + +// The cmcguinness tool displays a random number. +package main + +import "fmt" + +// randomNumber implementation sourced from https://xkcd.com/221/. +// chosen by a fair dice roll. +// guaranteed to be random +const randomNumber = 4 + +func main() { + fmt.Printf("Your random number of the day is: %v", randomNumber) +}