go_study/bilibili/aceid/init/main.go
2024-11-14 18:01:59 +08:00

15 lines
305 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package main
import (
_ "init/lib1" // 匿名导入只执行包的init函数不能调用包内的方法
// mylib2 "init/lib2"
. "init/lib2" // 把包导入当前包,包内接口直接使用(不建议)
)
func main() {
// lib1.Lib1Test()
// lib2.Lib2Test()
// mlib2.Lib2Test()
Lib2Test()
}