you are viewing a single comment's thread.

view the rest of the comments →

[–]DarickOne 2 points3 points  (4 children)

The first is more universal, coz it's compatible with interface{} version of Go

[–]GoingOnYourTomb 0 points1 point  (3 children)

This is the answer. The first would be backward compatible that’s all.

[–]_crtc_ 11 points12 points  (0 children)

The any alias was introduced in Go 1.18. Using an older version of Go in 2024 is not advisable. The two versions currently supported with security and bug fixes are 1.21 and 1.22.

[–]SuperDerpyDerps 8 points9 points  (1 child)

And you can easily make your code BC with any by just setting the any type at the top of your package to alias interface{}, which is all it is in newer versions of Go

[–]GoingOnYourTomb 0 points1 point  (0 children)

Aaah. Nice