小编Yin*_*Liu的帖子

如何在golang中列出包的公共方法

如何在golang中列出包的公共方法?

main.go

package main

func main() {
// list all public methods in here
}
Run Code Online (Sandbox Code Playgroud)

库/ method.go

package libs

func Resut1() {
    fmt.Println("method Result1")
}

func Resut2() {
    fmt.Println("method Result2")
}
Run Code Online (Sandbox Code Playgroud)

reflection go

2
推荐指数
1
解决办法
3988
查看次数

标签 统计

go ×1

reflection ×1