feat: tool 添加 gin local

This commit is contained in:
zhaoyupeng committed 2025-07-04 10:27:44 +08:00
1 parent 002f5f15fb
commit 5df55a364d
2 files changed
+17

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
package tool
import "github.com/gin-gonic/gin"
func Local(c *gin.Context, key string) any {
data, ok := c.Get(key)
if !ok {
return nil
}
return data
}