Open eubnara opened 2 years ago
https://go.dev/doc/tutorial/getting-started
go mod tidy
로 모듈 요구사항 및 sum 받기https://go.dev/doc/tutorial/create-module
go 파일 -> 패키지 -> 모듈
# 로컬 모듈 참조하게 만들기
go mod edit -replace example.com/greetings=../greetings
# semantic version number 가 없는 로컬 모듈에 대해서 pseudo-version number 를 추가한다.
go mod tidy
https://go.dev/tour/flowcontrol/13
defer 로 함수호출을 하면 stack 형태로 last in first out 호출이 된다.
type assertions https://go.dev/tour/methods/15
t := i.(T) // T 타입이 아니면 panic 발생할 수 있음
t, ok := i.(T) // T 타입이 아니어도 panic 발생하지 않음
map 을 접근하는 형태와 유사
elem = m[key]
elem, ok := m[key]
https://go.dev/doc/
go modules