Don’t Java and Go do something similar?

Go does not. For Java, I would not look at their x509 handling for inspiration.