LoginSignup
0
0

More than 3 years have passed since last update.

Go 依存モジュール管理ツールでプロジェクトを作る:(備忘録)

Last updated at Posted at 2020-12-03

Goでプロジェクトを作成するときに毎回調べているので備忘録として残す。

環境
・Mojave 10.14.6
・go1.15.2 darwin/amd64

プロジェクト作成

cd (任意のディレクトリ)
go mod init (プロジェクト名)

ビルドコマンド

そのまま作る場合

go build

Windows用の場合

GOOS=windows GOARCH=386 go build

コンパイル設定値
公式サイト

$GOOS $GOARCH
aix ppc64
android 386
android amd64
android arm
android arm64
darwin amd64
darwin arm64
dragonfly amd64
freebsd 386
freebsd amd64
freebsd arm
illumos amd64
js wasm
linux 386
linux amd64
linux arm
linux arm64
linux ppc64
linux ppc64le
linux mips
linux mipsle
linux mips64
linux mips64le
linux s390x
netbsd 386
netbsd amd64
netbsd arm
openbsd 386
openbsd amd64
openbsd arm
openbsd arm64
plan9 386
plan9 amd64
plan9 arm
solaris amd64
windows 386
windows amd64
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0