hashicorp / hashicorp/hcl

Gocritic 3.3 warning: rangeValCopy-ref

Open
#256 0 comments 0 reactions 0 assignees View on GitHub
v1
Dominant language
Go
Stars
5.8k
Forks
657
Avg merge
20h 36m
Merged PRs (30d)
6

Description

Found using: https://go-critic.github.io/overview#rangeValCopy-ref
```
$GOPATH/src/github.com/hashicorp/hcl/decoder.go:638:2: rangeValCopy: each iteration copies 128 bytes (consider pointers or indexing)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in decoder.go at line 638 and read the surrounding loop that triggered the Gocritic rangeValCopy warning. Review the linked rangeValCopy-ref guidance before choosing between pointers or indexing, then verify that the warning is gone without changing decoding behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
performance
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.