Cộng đồng Hỏi & Đáp của Inflearn
golang 질문
Viết
·
305
·
Đã chỉnh sửa
0
go env
set GOBIN=C:\go_study\bin
set GOROOT=C:\Program Files\Go
set GOPATH=C:\go_study

PS C:\go_study\src\section1> go run main
cannot find package "main" in any of:
C:\Program Files\Go\src\main (from $GOROOT)
C:\go_study\src\main (from $GOPATH)
관련된 에러가 나고 있습니다.
이유를 잘모르겠습니다.
PS C:\go_study\src\section1> go mod init main
go: creating new go.mod: module main
go: to add module requirements and sums:
go mod tidy
PS C:\go_study\src\section1> go mod tidy
PS C:\go_study\src\section1> go run main
helloworld.go:1:1: expected 'package', found pakcage
visual studio일 경우에는 어떻게 해결하나요?
go
Câu trả lời 1
0
niceman
Người chia sẻ kiến thức
안녕하세요.
위에 package 부분이 오타가 난 것 같은데 확인 부탁드립니다.
아울러, 제공 드리는 원본 소스코드 정답 파일도 꼭 확인해 보세요!





