13 lines
316 B
Go
13 lines
316 B
Go
package main
|
|
|
|
import (
|
|
_ "database/sql" // 空白导入,仅执行包的初始化函数
|
|
f "fmt" // 为fmt包指定别名f
|
|
)
|
|
|
|
func main() {
|
|
f.Println("Hello, World!") // 使用别名
|
|
//fmt.Println(m.Pi) // 不使用别名
|
|
//fmt.Println(ToUpper("hello")) // 点导入,直接使用函数
|
|
}
|