首次提交:初始化项目代码
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bulma/init_example/config"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func init() {
|
||||
fmt.Println("Initializing main package...")
|
||||
}
|
||||
|
||||
// 包变量初始化
|
||||
var counter = initializeCounter()
|
||||
|
||||
// 初始化函数
|
||||
func init() {
|
||||
fmt.Println("Initializing example package...")
|
||||
}
|
||||
|
||||
// 另一个初始化函数
|
||||
func init() {
|
||||
fmt.Println("Another initialization function...")
|
||||
}
|
||||
|
||||
func initializeCounter() int {
|
||||
fmt.Println("Initializing counter...")
|
||||
return 0
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("Starting application...")
|
||||
fmt.Printf("Server will run on port %d in %s mode\n",
|
||||
config.AppConfig.Port, config.AppConfig.Env)
|
||||
}
|
||||
Reference in New Issue
Block a user