From c3b314cb72c6c8f131edd81bd0ff3ea8d4125369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 29 Dec 2025 11:27:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=A8=A1=E5=BC=8F=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gin.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gin.go b/gin.go index 000eb31..b88f8b3 100644 --- a/gin.go +++ b/gin.go @@ -40,3 +40,22 @@ const ( GinLogicAfterResponseKey = "__logic_after_response__" // gin请求成功后, 执行的逻辑 GinTraceInstanceField = "__trace_instance__" // trace实例的key ) + +// Mode 服务器模式 +type Mode string + +func (m Mode) String() string { + return string(m) +} + +func (m Mode) Value() string { + return m.String() +} + +const ( + ModeDefault Mode = "local" // 默认模式 - 本地开发 + ModeTest Mode = "test" // 测试模式 + ModeProd Mode = "prod" // 生产模式 + ModePreview Mode = "preview" // 预览模式 + ModeSandbox Mode = "sandbox" // 沙盒模式 +)