We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version: go1.18.3 darwin/arm64
main.go
package main import "fmt" func main() { fmt.Println("hello world") }
Makefile
default: app run: app ./$^ app: main.go go build -o $@ $^ clean: rm app .PHONY: run clean
make && make run
file app
app: Mach-O 64-bit executable arm64
说明:
注:
import "fmt"
import "foo/bar"
fmt.Println
Go关于模块的信息很乱,前后的变化差异很大,这里一定只能看官网文档。我现在说也不等于你看的时候对,所以还是直接去官网看文档最靠谱。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
version: go1.18.3 darwin/arm64
Hello World
main.go
Makefile
make && make run
file app
:app: Mach-O 64-bit executable arm64
说明:
Package
注:
import "fmt"
orimport "foo/bar"
: 这里的import后面是pathfmt.Println
: 这里的fmt是package name,即文件第一行声明的包名Module
Go关于模块的信息很乱,前后的变化差异很大,这里一定只能看官网文档。我现在说也不等于你看的时候对,所以还是直接去官网看文档最靠谱。
参考课程和文档
The text was updated successfully, but these errors were encountered: