From c85e62b46a94615fe0d0a91baa4357c6556d4865 Mon Sep 17 00:00:00 2001 From: guangwu Date: Mon, 24 Jul 2023 21:20:28 +0800 Subject: [PATCH] chore: os.SEEK_END has been deprecated since Go 1.7 (#198) --- http/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/api.go b/http/api.go index cd0d885..eeab5f3 100644 --- a/http/api.go +++ b/http/api.go @@ -91,7 +91,7 @@ var apiLogHandler = func(path string) gin.HandlerFunc { } max := math.Max(float64(-fi.Size()), -1024*8*8) - _, err = f.Seek(int64(max), os.SEEK_END) + _, err = f.Seek(int64(max), io.SeekEnd) if err != nil { ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) return