์์, ๊ทธ๊ฑด ์ ์์์ ๋๋ค๋ง
go mod init
- go mod ํ์ผ ์์ฑ
go run .
- go ํ์ผ ์คํ ๋ช ๋ น์ด
go mod tidy
- ์ต์ ํจํค์ง๋ก ์ค์น
- ํจํค์ง๋ฅผ ์ ๊ธฐํ๊ฒ ๊ฐ์ ธ์ค๋ค.. package / symbol ์ฐพ๋ ๊ณณ์ ์ฌ๊ธฐ
Go code is grouped into packages, and packages are grouped into modules.
- ๋ชจ๋ ์ด๋ฆ ์ ํ๊ธฐ
- https://go.dev/doc/modules/managing-dependencies#naming_module
<prefix>/<descriptive-text>
- prefix: ๋ ํฌ ์ด๋ฆ ๋๋ ๋ค๋ฅธ ์ฌ๋์ด ์ฌ์ฉํ์ง ์์ ์ด๋ฆ
- descriptive-text: ํ๋ก์ ํธ ์ด๋ฆ
- Exported names
- ํจ์ ์ด๋ฆ์ ์ฒซ๊ธ์๊ฐ ๋๋ฌธ์์ธ ๊ฒฝ์ฐ ํธ์ถ ๊ฐ๋ฅ
:=
- ๋ณ์ ์ ์ธํ๊ณ initializing ํ ์ค๋ก ํ ์ ์๊ฒ ํจ
- ์ค์ง์ด ๊ฐ๋ค ์ฝ๊ฐ qm6 ์ผํฐํ์์ ๊ฐ๊ธฐ๋ ํ๊ณ