I’m trying to build a server and a client with Go. However, I only find SetsockoptString() in the syscall but no function GetsockoptString(). (https://golang.org/pkg/syscall/) Are there any ideas to have such call? It is kind of weird to me that the syscall functions are not symmetric.
I have no answer to your question, but it seems worth noting that the syscall package seems deprecated:
NOTE: This package is locked down. Code outside the standard Go repository should be migrated to use the corresponding package in the The Go Programming Language repository
However, the sys package does not seem to resolve your problem. The setsockopt/getsockopt asymmetry is still there.