Silence gopls hints (#2195)

This commit is contained in:
CatsDeservePets authored and GitHub committed 2025-10-09 02:18:16 +02:00
1 parent 4dc3d37684
commit 4bfd3c8ac5
9 files changed
+26 -27

No files matched your search

+5 -5
View File
@@ -173,7 +173,7 @@ func splitWord(s string) (word, rest string) {
// or double quotes can be used to escape whitespaces. Hash characters can be
// used to add a comment until the end of line. Leading and trailing space is
// trimmed. Empty lines are skipped.
func readArrays(r io.Reader, min_cols, max_cols int) ([][]string, error) {
func readArrays(r io.Reader, minCols, maxCols int) ([][]string, error) {
var arrays [][]string
s := bufio.NewScanner(r)
for s.Scan() {
@@ -209,11 +209,11 @@ func readArrays(r io.Reader, min_cols, max_cols int) ([][]string, error) {
})
arrlen := len(arr)
if arrlen < min_cols || arrlen > max_cols {
if min_cols == max_cols {
return nil, fmt.Errorf("expected %d columns but found: %s", min_cols, s.Text())
if arrlen < minCols || arrlen > maxCols {
if minCols == maxCols {
return nil, fmt.Errorf("expected %d columns but found: %s", minCols, s.Text())
}
return nil, fmt.Errorf("expected %d~%d columns but found: %s", min_cols, max_cols, s.Text())
return nil, fmt.Errorf("expected %d~%d columns but found: %s", minCols, maxCols, s.Text())
}
for i := range arrlen {