在 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 實現嗎?如果是這樣,如何?
特定操作系統或架構的測試文件
慕碼人8056858
2021-09-13 15:58:06