mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-21 20:36:01 +03:00
22 lines
207 B
Go
22 lines
207 B
Go
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)))
|
|
|
|
}
|