Open2
Go言語ことはじめ
-
Download and Install
- [Download (1.21.0]] →
Apple macOS (ARM64)
- macOS 11 or later, Apple 64-bit processor
- go1.21.0.darwin-arm64.pkg
- [続ける]→[インストール]→[閉じる]→[ゴミ箱に入れる]
- go1.21.0.darwin-arm64.pkg
- macOS 11 or later, Apple 64-bit processor
- [Download (1.21.0]] →
- ターミナル起動
- sharl@macMini ~ %
go version
実行結果
go version go1.21.0 darwin/arm64
- sharl@macMini ~ %
mkdir -p ./dev/go/test ; cd ./dev/go/test
- sharl@macMini test % vim test-gohelllo.go
test-gohelllo.go
package main
import "fmt"
func main() {
fmt.Println("Hello!こんにちわ!")
}
- sharl@macMini test %
ls
実行結果
test-gohelllo.go
- sharl@macMini test % go run test-gohelllo.go
実行結果
Hello!こんにちわ!