Introduction

This is the notes written for the learning of GoLang Structure

The stucture of a typical GoLang program should be like this:

bin/
    mathapp
pkg/
    darwin_amd64/
         mymath.a
         github.com/
              astaxie/
                   beedb.a
src/
    mathapp
          main.go
    mymath/
          sqrt.go
    github.com/
           astaxie/
                beedb/
                    beedb.go
                    util.go

bin/ is responsable for the execuable after compiling
pkg/ is responsable for the private packages and downloaded packages
src/ is for the surce code

Go commands

go build: Compile the source code and the related packages if necessary.
For normal packages, if you intend to generate corresponding files in $GOPATH/pkg, use go install instead. For package including "main", one executable file will be generated afterwards in the current path

go clean: delete those unnecessary realaying files
go fmt: formating the file you select.
go get: dramatically and remotely get the packages from the server,
go install: generate .a or executable files and move it to GOPATH/pkg* or *GOPATH/bin

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,866評論 0 10
  • 還沒睜開眼月亮已經(jīng)偏移云卷著風(fēng)掃了一筐星倒進(jìn)黑暗的漩渦里 呼吸變成多余起伏的不再是身體而是一百年那么長的孤寂摘不開...
    蘇坡拉底閱讀 419評論 4 6
  • 今天開始分享《母愛的羈絆》,作者:美國 卡瑞爾·麥克布萊德博士 著 “愛來自父母,令人悲哀的是,傷...
    解欣閱讀 2,458評論 0 0
  • 生命是一種狀態(tài),以何種狀態(tài)面對生活是個(gè)人的選擇。 每個(gè)人來到這個(gè)世界上,受家庭、教育、社會(huì)等等...
    小蒜瓣閱讀 403評論 0 1
  • 以前以為的孤獨(dú)便是獨(dú)自一人吃飯,逛街,看書,出去旅行。而自己卻是時(shí)時(shí)有人陪著去經(jīng)歷那些,甚至曾一度的遠(yuǎn)離她們,特意...
    翊昕淺笑閱讀 258評論 0 0

友情鏈接更多精彩內(nèi)容