go初始化
已收录文章:1篇
-
依次见例子代码: p1.go package p1 import "fmt" //1.1 var x float32 = 1.2 //1.2 func init() { //1.3 fmt.Printf("p1 package, x:%f\n", x) //1.4 } func Donothing() { fmt.Println("do nothing.\n") } a.go: package main import "fmt" var WhatIsTh252 收藏