go-doc-问题

“gcc”: executable file not found in %PATH%

1
2
3
4
5
6
7
8
# 下载 https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.2/threads-posix/seh/

# 解压到存放的目录

# 把bin目录加到path

# 测试
gcc -v

返回nil不是nil

使用函数返回引用值的时候,如果不是interface而是具体到某类型指针的时候*xxxx,如果这个函数被一个返回interface的函数再次返回,那么返回的值不可以用nil判断,一定需要用var *xxxx = nil才可以判断。

为了简单解决这个问题,如果需要被多次调用的函数,最好都返回interface而不是*xxxx

malformed module path “lsg/libImplementation”: missing dot in first path element

go.mod 目录少了 lsg/libImplementation 的引用