type
Post
status
Invisible
date
Jun 5, 2023
slug
golang-command
summary
golang command
tags
Golang
category
多语言
icon
password
 
  1. 执行文件:go run [go.file]
  1. 添加module到workspace :go work use [module path]
  1. 下载依赖:go get golang.org/x/[email protected] go get [module path]
  1. 初始化workspace:go work init
  1. 将依赖增加到go.mod: go mod tidy
  1. 格式化:gofmt -w hello.go
  1. 编译指定文件为二进制文件 go build -o(output) 目标文件名 来源go文件
  1. 执行测试文件 go test -v(显示详细的执行命令) -test.run SpecifiedTest
  1. 查看是否存在资源竞争 go build -race test.go
 
标普500分析(1.5-1.9)多线程
Loading...