Topic: golang
-
Regex flavors: BRE/ERE, PCRE2, RE2, JavaScript, Python and .NET side by side
The characters + ? | ( ) { } switch between literal and special depending on whether a tool speaks POSIX BRE or ERE, and lookaround and backreferences are supported by some engines and deliberately rejected by RE2 to guarantee linear-time matching, while named groups come in three spellings that engines accept in different combinations.
-
Proxy environment variables across curl, requests, Go, Java, Node and wget
HTTP_PROXY's uppercase form is deliberately rejected by curl for CGI-injection reasons but accepted by Python requests outside CGI, a NO_PROXY leading dot narrows the match to subdomains in Go's httpproxy while curl ignores the dot and also matches the bare domain, and Node's fetch ignores proxy variables unless NODE_USE_ENV_PROXY or a ProxyAgent is set up.
-
Duration and interval strings: ISO 8601, Go's ParseDuration, systemd, Prometheus, PostgreSQL and .NET TimeSpan
PT1H30M, 1h30m, '1h 30min' and 01:30:00 can all describe the same span of time, but each parser accepts a different alphabet of unit suffixes and rejects everything else, so a duration string copied between systems often simply fails to parse.
-
Date and time format tokens: strftime, Java, Go, .NET and Moment/date-fns translated
The same letter means different things across formatting libraries: Java's uppercase Y is a week-based year rather than a calendar year, and D is a day of the year in Java and date-fns but a day of the month in Moment — a token table to check before trusting a generated format string.
Machine-readable: JSON