github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/blog/content/constants/complex1.go (about)

     1  // +build OMIT
     2  
     3  package main
     4  
     5  import "fmt"
     6  
     7  func main() {
     8  	// START OMIT
     9  	type MyComplex128 complex128
    10  	const I = (0.0 + 1.0i)
    11  	const TypedI complex128 = (0.0 + 1.0i)
    12  	var mc MyComplex128
    13  	mc = (0.0 + 1.0i) // OK
    14  	mc = I            // OK
    15  	mc = TypedI       // Bad
    16  	fmt.Println(mc)
    17  	// STOP OMIT
    18  }