Skip to content

Commit a029aba

Browse files
authored
dev: improve comments (#5846)
1 parent 026567f commit a029aba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/goanalysis/pkgerrors/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func parseError(srcErr packages.Error) (*result.Issue, error) {
2626
}
2727

2828
func parseErrorPosition(pos string) (*token.Position, error) {
29-
// file:line(<optional>:colon)
29+
// file:line(<optional>:column)
3030
parts := strings.Split(pos, ":")
3131
if len(parts) == 1 {
3232
return nil, errors.New("no colons")
@@ -39,7 +39,7 @@ func parseErrorPosition(pos string) (*token.Position, error) {
3939
}
4040

4141
var column int
42-
if len(parts) == 3 { // no column
42+
if len(parts) == 3 { // got column
4343
column, err = strconv.Atoi(parts[2])
4444
if err != nil {
4545
return nil, fmt.Errorf("failed to parse column from %q: %w", parts[2], err)

0 commit comments

Comments
 (0)