Closed gaby closed 3 months ago
I'm not sure why the CI golangci-lint is failing, it runs fine locally.
@valyala Thoughts on these changes?
我不确定为什么 CI golangci-lint 失败了,它在本地运行良好。
@gaby ci error message :
tcpdialer.go:129: File is not gofumpt
-ed (gofumpt)
prefork/prefork.go:45: File is not gofumpt
-ed (gofumpt)
This is due to the use of https://github.com/mvdan/gofumpt to implement a stricter fmt. Delete the blank lines of tcpdialer.go:129 and prefork/prefork.go:45 should be able to solve the problem.
我不确定为什么 CI golangci-lint 失败了,它在本地运行良好。
@gaby ci error message : tcpdialer.go:129: File is not
gofumpt
-ed (gofumpt) prefork/prefork.go:45: File is notgofumpt
-ed (gofumpt)This is due to the use of mvdan/gofumpt to implement a stricter fmt. Delete the blank lines of tcpdialer.go:129 and prefork/prefork.go:45 should be able to solve the problem.
Yeah, I had ran it and it wasn't removing them. I removed them manually. Should work now. Thanks
Thanks!
@erikdubbelboer Not sure your thoughts on this since it changes the order of fields in some of the public structs.
Affected Public Structs:
This is something we ran into in Fiber https://github.com/gofiber/fiber/pull/3079, we had a lot of places in the code base using
positional
instead ofnamed
fields. This can cause major bugs in the future when the underlying struct changes. I wrote an analyzer to detect and fix these issues. After fixing those, I ranbetteralign
against the whole code base.Summary of savings:
Total savings: 1336 bytes