📌  相关文章
📜  所有测试之前的 golang - Go 编程语言 - Go 编程语言代码示例

📅  最后修改于: 2022-03-11 14:45:02.793000             🧑  作者: Mango

代码示例1
This can be achieved by putting a init() function in the myfile_test.go file. This will be run before the init() function.

// myfile_test.go
package main

func init() {
     /* load test data */
}
The myfile_test.init() will be called before the package init() function.