A:调整Mac依赖
This commit is contained in:
1 parent
4e7c8094d6
commit
f7ae49676f
4 files changed
+14
-5
No files matched your search
@@ -14,7 +14,8 @@
|
|||||||
"Bash(go test:*)",
|
"Bash(go test:*)",
|
||||||
"Bash(git add:*)",
|
"Bash(git add:*)",
|
||||||
"Bash(del \"D:\\go-argus\\src\\rear\\api_tests.http\")",
|
"Bash(del \"D:\\go-argus\\src\\rear\\api_tests.http\")",
|
||||||
"Bash(curl:*)"
|
"Bash(curl:*)",
|
||||||
|
"Bash(pkill:*)"
|
||||||
],
|
],
|
||||||
"deny": []
|
"deny": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"rear/pkg/logger"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"rear/pkg/logger"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type PhotoHandler struct {
|
type PhotoHandler struct {
|
||||||
@@ -192,7 +193,7 @@ func (h *PhotoHandler) GetPhoto(c *gin.Context) {
|
|||||||
switch format {
|
switch format {
|
||||||
case "thumbnail":
|
case "thumbnail":
|
||||||
// 解析尺寸参数
|
// 解析尺寸参数
|
||||||
size, err := h.parseSize(string(size))
|
size, err := h.parseSize(strconv.Itoa(size))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(http.StatusBadRequest, model.Response{
|
c.JSON(http.StatusBadRequest, model.Response{
|
||||||
Code: http.StatusBadRequest,
|
Code: http.StatusBadRequest,
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ func GetVipsImageInfo(ctx context.Context, inputPath string) (*VipsImageInfo, er
|
|||||||
if err := utils.EnsureInitialized(nil, nil); err != nil {
|
if err := utils.EnsureInitialized(nil, nil); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// 构建 vipsheader.exe 的路径
|
// 构建 vipsheader 的路径(跨平台兼容)
|
||||||
vipsHeaderPath := filepath.Join(filepath.Dir(utils.VipsPath), "vipsheader.exe")
|
vipsHeaderPath := filepath.Join(filepath.Dir(utils.VipsPath), "vipsheader")
|
||||||
|
|
||||||
// 执行 vipsheader -a 命令
|
// 执行 vipsheader -a 命令
|
||||||
result, err := utils.ExecuteCommand(ctx, vipsHeaderPath, "-a", inputPath)
|
result, err := utils.ExecuteCommand(ctx, vipsHeaderPath, "-a", inputPath)
|
||||||
|
|||||||
@@ -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 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-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-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"}
|
||||||
Reference in new issue
Block a user