Merge origin/main (phase 5, drift and merge) into feat/ledger-ui-services-agents-18
Conflicts: - CLAUDE.md: keep both sets of gotchas (drift/merge from main, SSE ping and swarm_cluster_id from this branch). - internal/imageref/imageref_test.go: keep both TestIsDigest (main) and TestIsRegistryHost (this branch). - internal/master/web/server.go: take main's renderServiceError and make it render through s.page, so service error pages get the sidebar nav data. Also renumber this branch's migration 0005_agent_cluster.sql to 0006_agent_cluster.sql, after main's 0005_drift_merge.sql. Claude-Session: https://claude.ai/code/session_01GAZsp3P7Qto6JnhipxWUJQ
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
// and digest.
|
||||
package imageref
|
||||
|
||||
import "strings"
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Ref is an image reference split into its parts. Tag and Digest are empty
|
||||
// when the reference has none.
|
||||
@@ -47,3 +50,8 @@ func (r Ref) String() string {
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
var digestPattern = regexp.MustCompile(`^sha256:[0-9a-f]{64}$`)
|
||||
|
||||
// IsDigest reports whether d is a well-formed sha256 digest.
|
||||
func IsDigest(d string) bool { return digestPattern.MatchString(d) }
|
||||
|
||||
Reference in New Issue
Block a user