rebase: bump the golang-dependencies group with 3 updates

Bumps the golang-dependencies group with 3 updates: [golang.org/x/crypto](https://github.com/golang/crypto), [golang.org/x/net](https://github.com/golang/net) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/crypto` from 0.23.0 to 0.24.0
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.24.0)

Updates `golang.org/x/net` from 0.25.0 to 0.26.0
- [Commits](https://github.com/golang/net/compare/v0.25.0...v0.26.0)

Updates `golang.org/x/sys` from 0.20.0 to 0.21.0
- [Commits](https://github.com/golang/sys/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-dependencies
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-dependencies
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2024-06-10 20:33:13 +00:00
committed by mergify[bot]
parent 766406dc80
commit f8b9bc02be
23 changed files with 364 additions and 624 deletions

View File

@ -138,21 +138,20 @@ func (p *Printer) Printf(key Reference, a ...interface{}) (n int, err error) {
func lookupAndFormat(p *printer, r Reference, a []interface{}) {
p.fmt.Reset(a)
var id, msg string
switch v := r.(type) {
case string:
id, msg = v, v
case key:
id, msg = v.id, v.fallback
default:
panic("key argument is not a Reference")
}
if p.catContext.Execute(id) == catalog.ErrNotFound {
if p.catContext.Execute(msg) == catalog.ErrNotFound {
p.Render(msg)
if p.catContext.Execute(v) == catalog.ErrNotFound {
p.Render(v)
return
}
case key:
if p.catContext.Execute(v.id) == catalog.ErrNotFound &&
p.catContext.Execute(v.fallback) == catalog.ErrNotFound {
p.Render(v.fallback)
return
}
default:
panic("key argument is not a Reference")
}
}