Skip to content

a2ikm/go-executable-binary-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goでライブラリとバイナリをまとめる

http://stackoverflow.com/questions/14284375 に従って、

src/
  github.com/
    a2ikm/
      tar/
        main.go          # tar binary
        tar/
          tar.go         # tar libary

みたいな構造にしてある。

importするときには

import (
  "github.com/a2ikm/tar/tar"
)

のように参照する。

実行ファイルをインストールするときは

go get install github.com/a2ikm/tar

のようにする。

なお無闇にtarというリポジトリを作りたくなかった都合上、cloneするときには

git cloen github.com/a2ikm/go-executable-binary-sample tar

のようにディレクトリ名をライブラリ名のtarと同じにする必要がある。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published