pk.Option improvement
This commit is contained in:
@ -17,7 +17,7 @@ type PublicKey struct {
|
||||
Signature []byte
|
||||
}
|
||||
|
||||
func (p *PublicKey) WriteTo(w io.Writer) (n int64, err error) {
|
||||
func (p PublicKey) WriteTo(w io.Writer) (n int64, err error) {
|
||||
pubKeyEncoded, err := x509.MarshalPKIXPublicKey(p.PubKey)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
@ -64,8 +64,8 @@ func (d *MojangLoginHandler) AcceptLogin(conn *net.Conn, protocol int32) (name s
|
||||
}
|
||||
|
||||
var (
|
||||
pubKey pk.Option[auth.PublicKey]
|
||||
profileUUID pk.Option[pk.UUID] // ignored
|
||||
pubKey pk.Option[auth.PublicKey, *auth.PublicKey]
|
||||
profileUUID pk.Option[pk.UUID, *pk.UUID] // ignored
|
||||
)
|
||||
err = p.Scan(
|
||||
(*pk.String)(&name), // decode username as pk.String
|
||||
|
Reference in New Issue
Block a user