awesome-patterns/shadow/main.go

22 lines
207 B
Go
Raw Normal View History

2018-07-02 09:35:03 +03:00
package main
import "fmt"
func f() string {
return "test"
}
func init() {
fmt.Println(f())
}
var g = "g"
func main() {
s := "hello world"
p := &s
*p = "H2"
fmt.Println(s, s[0], len([]byte(s)))
}