chore: format

This commit is contained in:
ryan
2026-08-26 15:13:23 +08:00
parent 2b69f4d8d7
commit 81739f9cb4
13 changed files with 26 additions and 14 deletions
+3 -2
View File
@@ -258,8 +258,9 @@ func StatFilesystem(path string) (int64, int64) {
if err := syscall.Statfs(absPath, &stat); err != nil {
return 0, 0
}
total := multiplyUint64Int64(stat.Blocks, stat.Bsize)
free := multiplyUint64Int64(stat.Bavail, stat.Bsize)
bsize := int64(stat.Bsize) //nolint:unconvert // Statfs_t.Bsize is int64 on Linux and uint32 on Darwin
total := multiplyUint64Int64(stat.Blocks, bsize)
free := multiplyUint64Int64(stat.Bavail, bsize)
used := max(total-free, 0)
return total, used
}
+1
View File
@@ -27,6 +27,7 @@ const (
oauthStateLimitKeyFormat = "oauth:state-limit:%s"
oauthStateLimitMax = 20
)
// OAuth 授权用途常量
const (
OAuthPurposeLogin = "login"
@@ -10,7 +10,6 @@ import (
"github.com/Rain-kl/Wavelet/internal/shared/response"
"github.com/gin-gonic/gin"
)
const ctxFlaredNodeKey = "flared_node"
@@ -10,7 +10,6 @@ import (
"github.com/Rain-kl/Wavelet/internal/shared/response"
"github.com/gin-gonic/gin"
)
const ctxRelayNodeKey = "relay_node"
+1 -2
View File
@@ -12,9 +12,9 @@ import (
"github.com/Rain-kl/Wavelet/internal/infra/persistence/idgen"
"github.com/Rain-kl/Wavelet/internal/listener"
"github.com/Rain-kl/Wavelet/internal/model"
pkgu "github.com/Rain-kl/Wavelet/pkg/util"
"github.com/Rain-kl/Wavelet/internal/shared/response"
"github.com/Rain-kl/Wavelet/pkg/logger"
pkgu "github.com/Rain-kl/Wavelet/pkg/util"
"github.com/gin-contrib/sessions"
"github.com/gin-gonic/gin"
)
@@ -50,7 +50,6 @@ type updateProfileRequest struct {
Location string `json:"location"`
}
// Login 用户密码登录
// @Summary 用户密码登录
// @Description 使用用户名和密码登录,登录成功后建立 Session。若管理员已关闭密码登录功能则返回错误。