From b00f47329dc4525275e6cc6a0340bdf18eab0951 Mon Sep 17 00:00:00 2001 From: flc1125 Date: Fri, 23 May 2025 15:14:08 +0800 Subject: [PATCH] refactor(context): replace fmt.Errorf with fmt.Sprintf in panic message --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index 2ed41c1f..b8d3dc34 100644 --- a/context.go +++ b/context.go @@ -289,7 +289,7 @@ func (c *Context) MustGet(key any) any { if value, exists := c.Get(key); exists { return value } - panic(fmt.Errorf("key \"%v\" does not exist", key)) + panic(fmt.Sprintf("key \"%v\" does not exist", key)) } func getTyped[T any](c *Context, key any) (res T) {