From 92cd405b2e3d351d4e4c63632235f56bd8870e30 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 25 Aug 2012 21:12:40 -0400 Subject: [PATCH] Playing with ranges --- gotime/src/ranges.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gotime/src/ranges.go diff --git a/gotime/src/ranges.go b/gotime/src/ranges.go new file mode 100644 index 0000000..9ae0a27 --- /dev/null +++ b/gotime/src/ranges.go @@ -0,0 +1,13 @@ +package main + +import "fmt" + +func main() { + pow := make([]int, 10) + for i := range pow { + pow[i] = 1 << uint(i) + } + for _, value := range pow { + fmt.Printf("%d\n", value) + } +}