Merge pull request #13031 from zenador/hide-pos-info-for-warnings

Hide position info for warnings when position is unknown
This commit is contained in:
Björn Rabenstein 2023-10-25 13:08:35 +02:00 committed by GitHub
commit c8332a852e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,6 +116,9 @@ type annoErr struct {
}
func (e annoErr) Error() string {
if e.Query == "" {
return e.Err.Error()
}
return fmt.Sprintf("%s (%s)", e.Err, e.PositionRange.StartPosInput(e.Query, 0))
}