Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore(pkgerrors): improve commentary
  • Loading branch information
scop committed Jun 1, 2025
commit cd963a1d23a8ff235406c3170e27479ecd980a6e
4 changes: 2 additions & 2 deletions pkg/goanalysis/pkgerrors/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func parseError(srcErr packages.Error) (*result.Issue, error) {
}

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

var column int
if len(parts) == 3 { // no column
if len(parts) == 3 { // got column
column, err = strconv.Atoi(parts[2])
if err != nil {
return nil, fmt.Errorf("failed to parse column from %q: %w", parts[2], err)
Expand Down
Loading