From d375a3bbbb5647e0c4f09b2d5a1e810f80ef86c1 Mon Sep 17 00:00:00 2001 From: Kanri Date: Fri, 15 Oct 2021 22:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E5=B0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- control/rule.go | 1 + plugin_diana/zhiwang.go | 1 + plugin_minecraft/manager.go | 7 ------- utils/dl/dl.go | 1 + utils/math/math.go | 4 ++-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/control/rule.go b/control/rule.go index ad5b0a96..ac040247 100644 --- a/control/rule.go +++ b/control/rule.go @@ -69,6 +69,7 @@ func (m *Control) Disable(groupID int64) { m.Unlock() } +// IsEnabledIn 开启群 func (m *Control) IsEnabledIn(gid int64) bool { m.RLock() var c grpcfg diff --git a/plugin_diana/zhiwang.go b/plugin_diana/zhiwang.go index 3b4dbd0d..7b477074 100644 --- a/plugin_diana/zhiwang.go +++ b/plugin_diana/zhiwang.go @@ -1,3 +1,4 @@ +// Package diana 嘉然相关 package diana import ( diff --git a/plugin_minecraft/manager.go b/plugin_minecraft/manager.go index 265aef4a..5195b5cf 100644 --- a/plugin_minecraft/manager.go +++ b/plugin_minecraft/manager.go @@ -1,10 +1,3 @@ -/* - * @Author: Kanri - * @Date: 2021-10-15 21:23:14 - * @LastEditors: Kanri - * @LastEditTime: 2021-10-15 21:40:37 - * @Description: - */ // Package minecraft MCSManager package minecraft diff --git a/utils/dl/dl.go b/utils/dl/dl.go index dcc3bea6..414e5ef1 100644 --- a/utils/dl/dl.go +++ b/utils/dl/dl.go @@ -7,6 +7,7 @@ import ( "os" ) +// DownloadTo 下载到路径 func DownloadTo(url, file string) error { resp, err := http.Get(url) if err == nil { diff --git a/utils/math/math.go b/utils/math/math.go index e364456e..ecb78445 100644 --- a/utils/math/math.go +++ b/utils/math/math.go @@ -1,7 +1,7 @@ // Package math 计算实用工具 package math -// min 返回两数最大值,该函数将被内联 +// Max 返回两数最大值,该函数将被内联 func Max(a, b int) int { if a > b { return a @@ -9,7 +9,7 @@ func Max(a, b int) int { return b } -// min 返回两数最小值,该函数将被内联 +// Min 返回两数最小值,该函数将被内联 func Min(a, b int) int { if a > b { return b