Goを使ってみた
最近はやりのGoを触ってみるべくチャレンジ
まずはGoをWindowsマシンにインストール
https://golang.org/dl/ のMicrosoft WindowsからGoをダウンロード
普通にインストール実施
適当なファイルを作成
main.go
package main
import "fmt"
func main() {
fmt.Printf("hellohogefuga\n")
}
go run コマンド実行
>go run main.go
hellohogefuga
vscodeで実施
するとこんなエラーが。
go: go.mod file not found in current directory or any parent directory; see 'go help modules'
exit status 1
Process exiting with code: 1
そのフォルダで以下実行
```
go mod init <フォルダ名>
```
無事実行できた。