Tags: xo/dburl
Tags
Updating golangci-lint configuration The disable list named exhaustruct, wsl and gomodguard. golangci-lint deprecated all three and replaced them with exhaustruct_v5, wsl_v5 and gomodguard_v2. The old names still resolve, so the entries were accepted without complaint while the replacements ran under `default: all`. That put 41 findings back into a clean run and reversed two decisions silently. Disables the new names as well, which brings the count to 8. Enables depguard in strict mode, allowing only the standard library. It reports nothing today, and it turns the zero dependency property into something the linter enforces rather than a convention. Emptying the allow list produces 43 findings, which confirms it runs. Drops the gosec exclusion for G390. No such rule exists, so the line did nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Removing dameng DM8 support usql has removed its Dameng support over the state of the upstream driver, github.com/godoes/gorm-dameng/dm8, and is unlikely to restore it. GenDameng was 130 lines against a median of about 20 for a generator, and almost all of it was validation compensating for that driver's hand-rolled DSN parser: it does not URL-decode values, silently keeps the last of a repeated option, merges options differing only in case, and cannot represent some delimiters in credentials. dburl never imports the driver, so none of that can be tested here and nothing detects the parser changing. Four fix commits in the seven weeks since it was added, against an otherwise stable library. Removes the dm scheme and its dm8 and dameng aliases, GenDameng, and the net import that only GenDameng used. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
duckdb: fix header detection for non-ASCII checksums
isDuckdbHeader matched `^.{8}DUCK.{8}` with a regexp, where `.` matches a
rune and not a byte. A checksum containing a valid multi-byte UTF-8
sequence, or a newline, shifted the match off the magic and the file was
not recognized as duckdb. An invalid UTF-8 byte decodes as one rune and is
harmless, so only those two cases break it.
The checksum covers the fixed header block rather than the data, so it is
a constant per storage version: detection worked or failed for every
database written by a given duckdb build, and differed between builds.
Three constants appear in the files on hand, two passing and one failing,
and the failing one is what duckdb-go/v2 currently writes.
Compare the bytes at offset 8 directly, and propagate the SchemeType error
from Parse so that a file with an unrecognized header reports
ErrUnknownFileHeader instead of the misleading ErrUnknownFileExtension.
testdata/test.duckdb is one of the passing constants and has been
byte-identical since v0.18.2, which is why the suite never caught this.
The unit fixture now uses a header carrying both hazards.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PreviousNext