Исходники и презентации
This commit is contained in:
16
lessons/environment/init_order/main.go
Normal file
16
lessons/environment/init_order/main.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
var value = func() int {
|
||||
fmt.Println("value initialized")
|
||||
return 0
|
||||
}()
|
||||
|
||||
func init() {
|
||||
fmt.Println("init called")
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("main called")
|
||||
}
|
||||
Reference in New Issue
Block a user