go
32 posts tagged go, newest first.
Posts
Config media type used as artifact type: FilterArtifactType in oras-go
A copy that used opts.FilterArtifactType(regexp.MustCompile("sbom")) skipped a referrer whose artifactType was application/vnd.example.sbom.v1, and "empty" copied it.
Escapes refused or read in halves: quoted strings in OjG
OjG, a Go library for JSON, refused \/ in a quoted name and read an escaped UTF-16 pair as two U+FFFD. RFC 9535 section 2.3.1.1 allows both.
A not that read to the end of the filter: the ! operator in OjG
In OjG, a Go JSON library with JSONPath, ! in a filter took in every && and || term after it: !@.a && @.b meant !(@.a && @.b). (!@.a) && @.b already worked.
A minus sign read as part of the operator: negative numbers in OjG filters
jp.ParseString in OjG, a Go JSON library with JSONPath, rejected a filter with no space between an operator and a negative number, such as $[?@.a==-1].
Anchors that split at an alternation: match() in OjG
In the Go library OjG, a JSONPath match() pattern with a top-level | was not tested against the whole string: ab|cd also matched abx and xcd, though RFC 9535 section…
Bytes counted instead of characters: length() of a string in OjG
length() of a string in OjG, a Go JSON library with JSONPath, returned the number of bytes, so "жж" had a length of 4.
An escaped emoji decoded as two U+FFFD: JSON strings in OjG
The oj, gen and sen parsers in OjG, a Go library, decoded an emoji written as an escaped UTF-16 pair, \ud83d\ude00, as two U+FFFD.
Equal operands that never satisfied <= or >=: filter comparisons in OjG
In OjG, a Go JSON library with JSONPath, <= and >= in a filter never matched two equal null, boolean, array or object values, or two missing values. == did.
An empty pattern that matched nothing: match() and search() in OjG
An empty pattern, '', made match() and search() select nothing in OjG, a Go library for JSON.
A dot that matched a carriage return: match() and search() in OjG
match(@, '.') and search(@, '.') selected a string that was one carriage return in OjG, a Go JSON library.
A tab, line feed or carriage return refused as blank space: JSONPath queries in OjG
A JSONPath filter written over two lines did not parse in OjG, a Go library for JSON.
Blank space refused before a segment and in a slice: JSONPath parsing in OjG
$ .a and $[1:5 :2] were parse errors in OjG, a Go library for JSON, though RFC 9535 allows blank space before a path segment and between the parts of a slice.
Removed ranges kept on the Service: loadBalancerSourceRanges in Kamaji
Clients outside a TenantControlPlane's old source ranges stayed blocked after the ranges were removed from it.
An update checked against the old object: the DNS service IP webhook in Kamaji
A TenantControlPlane could be edited to a DNS service IP outside its service CIDRs.
An error that was logged, not returned: the DataStore lookup in Kamaji
Kamaji hosts Kubernetes control planes as pods.
A log line that read the wrong error: the API server certificate check in Kamaji
A one-line mistake in a log call made Kamaji's reconcile panic when apiserver.crt was missing from the API server certificate Secret.
Strings and numbers rejected as sources: TypedArray.from in goja
Uint8Array.from("123") threw in goja, a JavaScript engine in Go: TypeError: Value is not an object: 123. Node returns Uint8Array(3) [ 1, 2, 3 ].
A method that never read exec: RegExp.prototype.test in goja
RegExp.prototype.test in goja, a JavaScript engine in Go, never read exec. A plain object with exec threw, and a replaced exec was ignored.
A nil exec was called: generic RegExp replace and split in goja
An empty object as this made RegExp.prototype[Symbol.replace] panic with a nil pointer in goja, a JavaScript engine in Go.
An undefined exec threw: RegExp match, search and global replace in goja
Setting exec to undefined on a regexp made match, search and a global replace throw in goja, a JavaScript engine in Go.
A length nothing checked: Array.from on array-likes in goja
In goja, a JavaScript engine in Go, Array.from({length: 232}) did not return in any practical time. Node throws RangeError: Invalid array length.
Run start reported as run end: LastRunStartedAt in gocron
With WithIntervalFromCompletion(), Job.LastRunStartedAt() returned the time the last run ended. gocron is a job scheduler for Go.
A one-value filter failed: VALUE_IN on list requests in Flyte
A Flyte ListActions request with a VALUE_IN filter and one value failed with an internal error. With two values it returned rows. Flyte orchestrates ML pipelines.
Terminated pods that hold their names: PodSet replacement in AIBrix
A PodSet in AIBrix, a control plane for serving LLMs on Kubernetes, never replaced a pod that ended Failed or Succeeded.
An unset strategy that nothing defaulted: RayClusterFleet in AIBrix
A RayClusterFleet in AIBrix, a control plane for serving LLMs on Kubernetes, never created a RayClusterReplicaSet when its strategy was unset.
A group that dropped the existence check: parenthesized paths in OjG
In OjG, a Go JSON library with JSONPath, a bare @.x in a filter tests that x exists, but (@.x) beside &&, || or ! did not.
Go's == where value equality belongs: the in filter in OjG
The in filter in OjG, a Go JSON library with JSONPath, panicked when its left operand was an array or object and the list held a member of the same kind.
A reset that skipped a removed block: kube-apiserver extraArgs in Kamaji
Deleting the whole extraArgs block from a TenantControlPlane in Kamaji, which runs Kubernetes control planes as pods, left its flags on the kube-apiserver container.
Truncation where jq rounds down: slice start index in gojq
In gojq, a pure Go implementation of jq, a slice with a negative fractional start such as .[-1.5:] returned a different result than jq.
An empty case in a Go switch: scrape mode changes on reload in sql_exporter
A reload that switched sql_exporter from one target to jobs returned success and kept the old target.
TrimPrefix is not TrimLeft: a false warning on every scrape error in sql_exporter
In single target mode, sql_exporter warned about its own log context on every scrape error. I fixed it with a one-word change (PR #1115, merged 2026-10-16 as 72c7582).
Two goroutines, one receive: a leak in the k3s tunnel proxy
k3s leaked a goroutine, its 32 KiB buffer and both connections whenever the two copy directions of a tunnel connection failed at about the same time.