A good rule of thumb when you're unsure of something in go is "check the source", especially where the syscall stuff is concerned. I suspect the lack of documentation is semi-intentional because as previously mentioned, it's not the recommended interface - better to use the net package for a portable solution :)
Once you get to the source ($GOROOT/src/pkg/syscall/syscall_windows.go), you'll notice that Sockaddr isn't a struct at all:
type Sockaddr interface {
sockaddr() (ptr uintptr, len int32, err error) // lowercase; only we can define Sockaddrs
}
So lets look for structs that implement this interface:
func (sa *SockaddrInet4) sockaddr() (uintptr, int32, error) {
func (sa *SockaddrInet6) sockaddr() (uintptr, int32, error) {
func (sa *SockaddrUnix) sockaddr() (uintptr, int32, error) {
The Inet6 and Unix implementations are just stubs in the version I'm looking at (1.0.2), but SockaddrInet4 is ready to go:
type SockaddrInet4 struct {
Port int
Addr [4]byte
raw RawSockaddrInet4
}
Just need to fill in Port and Addr.