摘要:
1.new方法 源码中的new()方法 // The new built-in function allocates memory. The first argument is a type,// not a value, and the value returned is a pointer to 阅读全文
摘要:
1.作用 go build:用于测试编译包,在项目目录下生成可执行文件(有main包)。 go install:主要用来生成库和工具。一是编译包文件(无main包),将编译后的包文件放到 pkg 目录下($GOPATH/pkg)。二是编译生成可执行文件(有main包),将可执行文件放到 bin 目录 阅读全文