Source file tour/basics/basic-types.go

     1  // +build OMIT
     2  
     3  package main
     4  
     5  import (
     6  	"fmt"
     7  	"math/cmplx"
     8  )
     9  
    10  var (
    11  	ToBe   bool       = false
    12  	MaxInt uint64     = 1<<64 - 1
    13  	z      complex128 = cmplx.Sqrt(-5 + 12i)
    14  )
    15  
    16  func main() {
    17  	fmt.Printf("Type: %T Value: %v\n", ToBe, ToBe)
    18  	fmt.Printf("Type: %T Value: %v\n", MaxInt, MaxInt)
    19  	fmt.Printf("Type: %T Value: %v\n", z, z)
    20  }
    21  

View as plain text