From a83befa0d111a0ba6fac52d763e93c76a2ef94d4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 19 Dec 2025 12:52:30 +0100 Subject: all: use any instead of interface{} Any is the preferred over interface{} now in Go. --- prog/encoding.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'prog/encoding.go') diff --git a/prog/encoding.go b/prog/encoding.go index 3bae29316..c468bd79e 100644 --- a/prog/encoding.go +++ b/prog/encoding.go @@ -74,7 +74,7 @@ func (ctx *serializer) print(text string) { ctx.printf("%v", text) } -func (ctx *serializer) printf(text string, args ...interface{}) { +func (ctx *serializer) printf(text string, args ...any) { fmt.Fprintf(ctx.buf, text, args...) } @@ -820,7 +820,7 @@ func (p *parser) parseArgUnion(typ Type, dir Dir) (Arg, error) { } // Eats excessive call arguments and struct fields to recover after description changes. -func (p *parser) eatExcessive(stopAtComma bool, what string, args ...interface{}) { +func (p *parser) eatExcessive(stopAtComma bool, what string, args ...any) { p.strictFailf(what, args...) paren, brack, brace := 0, 0, 0 for !p.EOF() && p.e == nil { @@ -1286,14 +1286,14 @@ func (p *parser) Ident() string { return s } -func (p *parser) failf(msg string, args ...interface{}) { +func (p *parser) failf(msg string, args ...any) { if p.e == nil { p.e = fmt.Errorf("%v\nline #%v:%v: %v", fmt.Sprintf(msg, args...), p.l, p.i, highlightError(p.s, p.i)) } } -func (p *parser) strictFailf(msg string, args ...interface{}) { +func (p *parser) strictFailf(msg string, args ...any) { if p.strict { p.failf(msg, args...) } -- cgit mrf-deployment