ここでは、ローカルに作成した他の Go モジュール内にある関数を呼ぶ手順を説明します。 サンプルコードの内容とディレクトリ構成 今、下記のようなフォルダ構造で二つのモジュール example.com/animal と example.com/app1 を作成することを考えます。 cd $GOPATH/src tree . . └── example.com ├── animal │ ├── cat │ │ └── cat.go │ └── duck │ └── duck.go └── app1 └── main.go 5 directories, 3 files ひとつは example.com/animal モジュール内に cat パッケージと duck パッケージがあります。 もうひとつは example.com/app1 モジュールです。こちらの main 関数から cat パッケー
![Go でローカルの他のモジュール内の関数を呼ぶ方法 - Go 言語入門](https://cdn-ak-scissors.b.st-hatena.com/image/square/91402b5ab5e6f1722194368466fc8aeac0be0d9d/height=288;version=1;width=512/https%3A%2F%2Fgolang.keicode.com%2Fimg%2Fgolang-logo-1.png)