Go moduleの使い方 - meruneru/tech_memo GitHub Wiki

Go moduleの使い方

参考にしたサイト

作業フォルダを作る

$ cd /tmp
$ mkdir go-mod-test 
$ cd go-mod-test 
$ go mod init example.com/go-mod-test

ソースコードを作成する

main.goを作る。

package main

import (
	"fmt"
	"rsc.io/quote"
)

func main() {
	fmt.Println(quote.Hello())
}
⚠️ **GitHub.com Fallback** ⚠️