chore: os.SEEK_END has been deprecated since Go 1.7 (#198)

This commit is contained in:
guangwu 2023-07-24 21:20:28 +08:00 committed by GitHub
parent fd0398188f
commit c85e62b46a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ var apiLogHandler = func(path string) gin.HandlerFunc {
} }
max := math.Max(float64(-fi.Size()), -1024*8*8) 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 { if err != nil {
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return return