在 Go 中,文件名具有语义含义。例如:
*_windows.go // Only include in compilations for Windows
*_unix.go // Only include in compilations for Unix
*_386.go // Only include in compilations for 386 systems
*_test.go // Only include when run with `go test`
但是,我似乎无法使以下内容起作用:
*_windows_test.go // Only include when running `go test` on windows
*_test_windows.go // Another attempt
这甚至可以用 Go 实现吗?如果是这样,如何?
守着一只汪
aluckdog
相关分类