Remove sub-path from container registry realm (#31293)

Container registry requires that the "/v2" must be in the root, so the
sub-path in AppURL should be removed
This commit is contained in:
wxiaoguang 2024-06-09 16:29:29 +08:00 committed by GitHub
parent 0188d82e49
commit 6106a61eff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 23 additions and 14 deletions

View file

@ -34,8 +34,10 @@ func IsNormalPageCompleted(s string) bool {
return strings.Contains(s, `<footer class="page-footer"`) && strings.Contains(s, `</html>`)
}
func MockVariableValue[T any](p *T, v T) (reset func()) {
func MockVariableValue[T any](p *T, v ...T) (reset func()) {
old := *p
*p = v
if len(v) > 0 {
*p = v[0]
}
return func() { *p = old }
}