Skip to content

jun-k/ubuntu-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

この開発コンテナの作り方

  1. 適当なフォルダを作成
mkdir ubuntu-go
  1. vscode でフォルダを開く

  2. F1 でコマンドパレットを開く

  3. 「add dev container」と入力し、 [Dev Containers: Add Development Container Configuration Files] (Dev Containers: 開発コンテナー構成ファイルの追加)を選ぶ。

  4. Select a container configuration template から [Ubuntu] を選択する。

  5. Ubuntu version で [jammy (default)] を選択。

  6. Select additional features to install で [Go devcontainers] の チェックボックスをオンにして OK

-> devcontainer.json が作成される。

  1. F1 でコマンドパレットを開き、 [Reopen in Container] を選択する。

  2. go がインストールされていることを確認

# go version
go version go1.19.4 linux/arm64
  1. hello.go ファイルを作成して、実行してみる。
package main

import "fmt"

func main() {
	fmt.Println("Hello, 世界")
}
# go run hello.go

About

開発コンテナ(言語:Go)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages