Skip to content

Instantly share code, notes, and snippets.

@gregworley
Created September 22, 2010 20:44
Show Gist options
  • Save gregworley/592528 to your computer and use it in GitHub Desktop.
Save gregworley/592528 to your computer and use it in GitHub Desktop.
// go/doc/GoCourseDay1.pdf Initialization example
package transcendental
import "math"
var Pi float64
func init() {
Pi = 4 * math.Atan(1) //init() function computes Pi
}
@gregworley
Copy link
Author

The
Go
Programming Language
Part 1
Rob Pike
October 2009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment