zgrab2 icon indicating copy to clipboard operation
zgrab2 copied to clipboard

Upgrade to go 1.23

Open thecsw opened this issue 5 months ago • 2 comments

Following upon #461, updating the go version to latest, the 1.23 release gives us many new improvements in both the compiler land and tooling land to utilize:

  • Profile Guided Optimizations (PGOs) straight with the compiler allows for 2-7% perf improvements. GA in 1.21.
  • Built-in min, max, so we don't have to constantly implement our own, see: utility.go:129, modules/mssql/connection.go:749, modules/oracle/types_test.go:455, lib/ssh/channel.go:134
  • Structured logging in the standard library!
  • Slices and maps helpers in the standard library.
  • ...and many other improvements all around that we would get for free with all the new tooling to improve zgrab2 further.

How to Test

CI/CD involved should handle it. As Go team noted in all release notes since 1.20 (current version in this project) to now,

As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before.

Compiling and running the program yields no issues.

Notes & Caveats

Only one "breaking" compile-time issue found in modules/amqp091/scanner.go:250, where ChannelMax was expecting an int but got an uint16. Casting here is safe as this is a type promotion with no requirements for this variable to be exactly 16 bits.

Issue Tracking

Add a link to the relevant GitHub issue(s) if the pull request resolves it.

thecsw avatar Sep 03 '24 02:09 thecsw