From c587e1307538a4860cf577279d1c151bfd5027c1 Mon Sep 17 00:00:00 2001 From: Md Mushfiqur Rahim <20mahin2020@gmail.com> Date: Fri, 29 May 2026 09:58:32 +0600 Subject: [PATCH] refactor: replace interface{} with any --- c.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c.go b/c.go index 80534e6..268e75b 100644 --- a/c.go +++ b/c.go @@ -222,7 +222,7 @@ func insnToC(insn instruction, blk *block) ([]string, error) { } } -func packetLoadToC(size int, offsetFmt string, offsetArgs ...interface{}) ([]string, error) { +func packetLoadToC(size int, offsetFmt string, offsetArgs ...any) ([]string, error) { offset := fmt.Sprintf(offsetFmt, offsetArgs...) switch size { @@ -237,7 +237,7 @@ func packetLoadToC(size int, offsetFmt string, offsetArgs ...interface{}) ([]str return nil, errors.Errorf("unsupported load size %d", size) } -func condToC(skipTrue, skipFalse skip, blk *block, condFmt string, condArgs ...interface{}) ([]string, error) { +func condToC(skipTrue, skipFalse skip, blk *block, condFmt string, condArgs ...any) ([]string, error) { cond := fmt.Sprintf(condFmt, condArgs...) if skipFalse == 0 { @@ -247,6 +247,6 @@ func condToC(skipTrue, skipFalse skip, blk *block, condFmt string, condArgs ...i return stat("if (%s) goto %s; else goto %s;", cond, blk.skipToBlock(skipTrue).Label(), blk.skipToBlock(skipFalse).Label()) } -func stat(format string, a ...interface{}) ([]string, error) { +func stat(format string, a ...any) ([]string, error) { return []string{fmt.Sprintf(format, a...)}, nil }