main.go

package main // import "hell"

func main() {
helloo("AA")
}



hello.go

package main // import "hell"

import (
"fmt"
)

func helloo(aa string) {
fmt.Println("Hello " + aa)
}



쉘 - 도스창

hello$ go mod init

go: creating new go.mod: module hell

hello$ go build

hello$ .hell.exe

Hello AA

hello$

hello$ ls



    디렉터리: D:\devs\pcbangstudio\workspace\hello



Mode                 LastWriteTime         Length Name

----                 -------------         ------ ----

-a----        2020-10-24  PM 11:13             21 go.mod

-a----        2020-10-24  PM 11:13        2149888 hell.exe

-a----        2020-10-24  PM 11:12            105 hello.go

-a----        2020-10-24  PM 11:12             61 main.go



hello$



라이브러리 분리는 댓글에 적은대로 깃헙 참고하시고, 통짜 묶음으로도 잘 되는디요???