A:调整Mac依赖

This commit is contained in:
jimmy committed 2025-08-24 16:52:18 +08:00
1 parent 4e7c8094d6
commit f7ae49676f
4 files changed
+14 -5

No files matched your search

+2 -1
View File
@@ -14,7 +14,8 @@
"Bash(go test:*)",
"Bash(git add:*)",
"Bash(del \"D:\\go-argus\\src\\rear\\api_tests.http\")",
"Bash(curl:*)"
"Bash(curl:*)",
"Bash(pkill:*)"
],
"deny": []
}
+3 -2
View File
@@ -13,9 +13,10 @@ import (
"strings"
"time"
"rear/pkg/logger"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"rear/pkg/logger"
)
type PhotoHandler struct {
@@ -192,7 +193,7 @@ func (h *PhotoHandler) GetPhoto(c *gin.Context) {
switch format {
case "thumbnail":
// 解析尺寸参数
size, err := h.parseSize(string(size))
size, err := h.parseSize(strconv.Itoa(size))
if err != nil {
c.JSON(http.StatusBadRequest, model.Response{
Code: http.StatusBadRequest,
@@ -63,8 +63,8 @@ func GetVipsImageInfo(ctx context.Context, inputPath string) (*VipsImageInfo, er
if err := utils.EnsureInitialized(nil, nil); err != nil {
return nil, err
}
// 构建 vipsheader.exe 的路径
vipsHeaderPath := filepath.Join(filepath.Dir(utils.VipsPath), "vipsheader.exe")
// 构建 vipsheader 的路径(跨平台兼容)
vipsHeaderPath := filepath.Join(filepath.Dir(utils.VipsPath), "vipsheader")
// 执行 vipsheader -a 命令
result, err := utils.ExecuteCommand(ctx, vipsHeaderPath, "-a", inputPath)
+7
View File
@@ -82,3 +82,10 @@
{"level":"info","time":"2025-08-22 19:41:04.261","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-22 23:48:45.047","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-23 00:17:09.951","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-24 16:17:08.457","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-24 16:21:32.884","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-24 16:23:05.455","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-24 16:24:55.243","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-24 16:29:29.397","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-24 16:38:36.826","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}
{"level":"info","time":"2025-08-24 16:51:39.825","caller":"config/config.go:90","msg":"加载配置文件成功","path":"config.yaml"}