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. --- pkg/ast/parser_test.go | 8 ++++---- pkg/ast/scanner.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/ast') diff --git a/pkg/ast/parser_test.go b/pkg/ast/parser_test.go index bc66ed4be..199bd7490 100644 --- a/pkg/ast/parser_test.go +++ b/pkg/ast/parser_test.go @@ -97,24 +97,24 @@ func TestParse(t *testing.T) { var parseTests = []struct { name string input string - result []interface{} + result []any }{ { "empty", ``, - []interface{}{}, + []any{}, }, { "new-line", ` `, - []interface{}{}, + []any{}, }, { "nil", "\x00", - []interface{}{}, + []any{}, }, } diff --git a/pkg/ast/scanner.go b/pkg/ast/scanner.go index 67dd80e52..326a0b9bb 100644 --- a/pkg/ast/scanner.go +++ b/pkg/ast/scanner.go @@ -289,7 +289,7 @@ func (s *scanner) scanIdent(pos Pos) (tok token, lit string) { return } -func (s *scanner) Errorf(pos Pos, msg string, args ...interface{}) { +func (s *scanner) Errorf(pos Pos, msg string, args ...any) { s.errors++ s.errorHandler(pos, fmt.Sprintf(msg, args...)) } -- cgit mrf-deployment