import한 패키지를 사용했을 때 Unresolved 표시가 되는 현상이 있었다.
ex.
computepb "cloud.google.com/go/compute/apiv1/computepb"
위 패키지를 사용한 computepb.Instance 구조체에서 Unresolved 표시
ex.
동료분이 공유해주신 원인은 패키지 파일이 너무 커서 인덱싱을 해오지 못해 그런 것이라고 한다.
GoLand를 완전히 기본 설정으로 사용하고 있는 중이었고 GoLand 설정을 통해 해결할 수 있었다.
1. GoLand 상단 Help > Edit Custom Properties... 클릭
2. 아래처럼 idea.properties 파일이 새로 뜨면 아래처럼 입력해주면 된다.
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=40000
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE is able to open.
#---------------------------------------------------------------------
idea.max.content.load.filesize=20000
3. GoLand 상단 메뉴 File > Invalidate Caches > Invalidate and Restart
이제 안뜸
'Go' 카테고리의 다른 글
[Go] 채널과 컨텍스트 (0) | 2022.03.06 |
---|---|
[Go] 고루틴(Goroutine) (0) | 2022.03.06 |
[Go] 인터페이스(Interface) (0) | 2022.03.05 |
[go/gin/gorm] Basic REST API 만들기 튜토리얼 (4) (0) | 2021.12.21 |
[go/gin] Basic REST API 만들기 튜토리얼 (3) (0) | 2021.12.18 |