Posts
Go: Split host and port without breaking IPv6 addresses
An IPv6 address contains colons, so splitting an endpoint at every colon loses its structure.
November 14, 2026
Go: Report the source position of an invalid CSV field
A CSV record can span physical lines, and a non-ASCII field can occupy several bytes per character.
November 14, 2026
Go: Remove one exact prefix and verify it was present
A line beginning with `id:` has a specific marker, not a set of removable characters.
November 14, 2026
Go: Quote diagnostic values without embedding raw newlines
A diagnostic value containing a newline can make one event look like two lines.
November 14, 2026
Go: Find the first sorted value that meets a threshold
A sorted capacity table can answer which entry first meets a requested size.
November 14, 2026
Go: Distinguish an absent regexp group from an empty match
In a small key/value grammar, `name` and `name=` can mean different things.
November 14, 2026
Go: Distinguish an absent header from a truncated header
A four-byte protocol header can arrive in several reads.
November 14, 2026
Go: Choose a JSON payload type after reading its envelope
A message envelope can identify how its payload should be decoded.
November 14, 2026
Go: Check errors when flushing buffered output
A successful write to a buffered writer may only mean that bytes entered its memory buffer.
November 14, 2026