Skip to content

Instantly share code, notes, and snippets.

@inancgumus
Last active October 10, 2017 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inancgumus/55c7fd0454f05b32895383b107179cd5 to your computer and use it in GitHub Desktop.
Save inancgumus/55c7fd0454f05b32895383b107179cd5 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
// has default type of float
const Tau = 3.14 * 2
// implicitly converted to a float64,
// because of the assignment to a "runtime" variable
// so, a type is needed for this "context"
pi := Tau / 2
fmt.Printf("pi: %f\n", pi)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment