func (m Message) StartupVersion() (string, error) {
	if m.Type() != 0 {
		return "", fmt.Errorf("expected untyped startup message, got: %q", m.Type())
	}
	major := int(binary.BigEndian.Uint16(m[4:6]))
	minor := int(binary.BigEndian.Uint16(m[6:8]))
	return fmt.Sprintf("%d.%d", major, minor), nil
}
StartupVersion returns the protocol version supported by the client. The version is
encoded by two consecutive 2-byte integers, one for the major version, and
the other for the minor version. Currently version 3.0 is the only valid
version.
package protocol
import (
	"bytes"
	"encoding/binary"
	"fmt"
)