Goland使用testing出现%1不是有效的Win32应用程序。-《GO开发知识笔记》

admin 2025-11-04 01:06:09 编程 来源:ZONE.CI 全球网 0 阅读模式

    df39c4fbbf03777a9ae32cec995735b.pngf5d3f3cc063e30a63c528e478425275.png问:看看ENV, 是不是交叉编译后忘记设置回环境变量了?go 1.8 版本有workspacego 1.8 版本以下用的是moudle

    image.png

    1. package util
    2. import (
    3. "log"
    4. "testing"
    5. )
    6. func TestPrettyPrint(t *testing.T) {
    7. type args struct {
    8. arr [][]string
    9. }
    10. tests := []struct {
    11. name string
    12. args args
    13. }{
    14. {
    15. name: "normal",
    16. args: args{
    17. arr: [][]string{
    18. {"te", "test", "sdf"},
    19. {"te11232", "test123123", "1232123"},
    20. },
    21. },
    22. },
    23. }
    24. for _, tt := range tests {
    25. t.Run(tt.name, func(t *testing.T) {
    26. log.Panic(tt.args.arr)
    27. })
    28. }
    29. log.Panic("---------------")
    30. }
    1. package util
    2. import (
    3. "log"
    4. "testing"
    5. )
    6. func TestFile(t *testing.T) {
    7. log.Panic("---------------测试")
    8. }
    以太坊cppgolang区别 编程

    以太坊cppgolang区别

    以太坊是一种去中心化的开源平台,它采用智能合约技术,旨在构建和运行不受干扰的分布式应用程序。作为目前最受欢迎的区块链平台之一,以太坊提供了多种编程语言的支持,其
    progolang 编程

    progolang

    Go语言(Golang)是由Google开发的一门静态类型编程语言。作为一名专业的Golang开发者,我深知这门语言的优势和特点。在本文中,我将介绍Golang
    golangn个发送者 编程

    golangn个发送者

    Golang是一种开源的编程语言,由Google团队开发,旨在提高程序的并发性和简化软件开发过程。在Go语言中,有时需要向多个接收者发送信息。本文将介绍如何在G
    golang技能图谱 编程

    golang技能图谱

    从互联网行业的快速发展到人工智能技术的日益成熟,各种编程语言也应运而生。而在这众多的编程语言中,Golang(即Go)作为一门强大且高效的开发语言备受关注。Go
    评论:0   参与:  20