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

     1  // +build OMIT
     2  
     3  package main
     4  
     5  import "fmt"
     6  
     7  const typedHello string = "Hello, 世界"
     8  
     9  func main() {
    10  	// START OMIT
    11  	type MyString string
    12  	var m MyString
    13  	m = typedHello // Type error
    14  	fmt.Println(m)
    15  	// STOP OMIT
    16  }