Compare commits

...

4 Commits

Author SHA1 Message Date
b463d38e66
minor improvements 2022-06-22 04:05:10 +01:00
b34986d594 minor changes to raw json output
Signed-off-by: Michael <michael.lindman@gmail.com>
2021-08-06 02:56:04 +01:00
20478e3c1f minor improvements and changes
Signed-off-by: Michael <michael.lindman@gmail.com>
2021-01-08 15:55:40 +00:00
049ab265d3 changes to protobuf buffers
Signed-off-by: Michael <michael.lindman@gmail.com>
2021-01-08 15:54:54 +00:00
8 changed files with 125 additions and 88 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
mcstatus
mcstatus.exe
run.sh
go.sum

View File

@ -22,6 +22,9 @@ clean:
go clean
proto:
protoc --go_out=/home/michael/go/src response.proto
protoc \
--proto_path=/usr/local/include/google/protobuf \
--proto_path=protobuf/ \
--go_out=$(GOPATH)/src protobuf/*.proto
.PHONY: run doc build debs update-debs fmt proto

View File

@ -7,8 +7,8 @@ import (
"strconv"
"time"
"git.0cd.xyz/michael/mcstatus/client/pb"
"github.com/golang/protobuf/jsonpb"
"git.0cd.xyz/michael/mcstatus/mcstatuspb"
"google.golang.org/protobuf/encoding/protojson"
)
// Client TCP client
@ -37,12 +37,18 @@ func (client *Client) write() error {
if err := client.Conn.SetWriteDeadline(time.Now().Add(10 * time.Second)); err != nil {
return err
}
client.Conn.Write(handshake(client.Addr, client.Port, client.Version))
_, err := client.Conn.Write(handshake(client.Addr, client.Port, client.Version))
if err != nil {
if netErr, ok := err.(net.Error); ok && netErr.Timeout() {
return err
}
return err
}
return nil
}
func (client *Client) read() (*pb.Response, error) {
var response pb.Response
func (client *Client) read() (*mcstatuspb.Response, error) {
var response mcstatuspb.Response
buf := make([]byte, 1024)
n, err := client.Conn.Read(buf)
if err != nil {
@ -54,8 +60,8 @@ func (client *Client) read() (*pb.Response, error) {
b := bytes.Split(buf[:n], []byte("{"))
ne := bytes.SplitAfterN(buf[:n], b[0], 2)
trim := bytes.TrimSuffix(ne[1], []byte("\x00"))
js := &jsonpb.Unmarshaler{AllowUnknownFields: true}
if err := js.Unmarshal(bytes.NewBuffer(trim), &response); err != nil {
js := &protojson.UnmarshalOptions{DiscardUnknown: true}
if err := js.Unmarshal(trim, &response); err != nil {
return nil, err
}
return &response, nil

View File

@ -3,12 +3,11 @@ package client
import (
"time"
"git.0cd.xyz/michael/mcstatus/client/pb"
"git.0cd.xyz/michael/mcstatus/mcstatuspb"
)
// GetStatus gets minecraft server status
func (client *Client) GetStatus() (*pb.Response, error) {
for {
func (client *Client) GetStatus() (*mcstatuspb.Response, error) {
if err := client.write(); err != nil {
return nil, err
}
@ -17,15 +16,16 @@ func (client *Client) GetStatus() (*pb.Response, error) {
return nil, err
}
return resp, nil
}
}
// PingServer pings Minecraft server
func (client *Client) PingServer() time.Duration {
func (client *Client) PingServer() (time.Duration, error) {
ping := make([]byte, 1)
start := time.Now()
client.Conn.Write([]byte{0x01, 0x00})
_, _ = client.Conn.Read(ping[:])
diff := time.Now().Sub(start)
return diff
if _, err := client.Conn.Write([]byte{0x01, 0x00}); err != nil {
return 0, err
}
client.Conn.Read(ping[:])
diff := time.Since(start)
return diff, nil
}

15
go.mod
View File

@ -3,6 +3,17 @@ module git.0cd.xyz/michael/mcstatus
go 1.15
require (
github.com/golang/protobuf v1.4.3
google.golang.org/protobuf v1.25.0
git.0cd.xyz/michael/toolbox v0.0.0-20220604033144-2bef86c689f1
github.com/gin-contrib/cors v1.3.1
github.com/gin-gonic/gin v1.8.1
github.com/go-playground/validator/v10 v10.11.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/net v0.0.0-20220621193019-9d032be2e588 // indirect
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
google.golang.org/protobuf v1.28.0
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1
)

29
main.go
View File

@ -28,19 +28,27 @@ func run() error {
return err
}
if cmd.ping {
fmt.Printf("Ping: %+v\n", client.PingServer())
return nil
}
if cmd.raw {
json, err := json.MarshalIndent(&status, "", " ")
ping, err := client.PingServer()
if err != nil {
return err
}
fmt.Printf("%s\n", string(json))
fmt.Printf("Ping: %+v\n", ping)
return nil
}
if cmd.raw {
encoder := json.NewEncoder(os.Stdout)
encoder.SetIndent("", " ")
if err := encoder.Encode(status); err != nil {
return err
}
return nil
}
name := status.Description.Text
if name == "" {
name = status.Description.Extra[0].Text
}
fmt.Printf("Name: %s\nPlayers: %d/%d\nVersion: %s\n",
status.Description.Text,
name,
status.Players.Online,
status.Players.Max,
status.Version.Name)
@ -50,7 +58,10 @@ func run() error {
fmt.Printf("\t%s\n", player.Name)
}
}
fmt.Printf("Ping: %+v\n", client.PingServer())
return nil
ping, err := client.PingServer()
if err != nil {
return err
}
fmt.Printf("Ping: %+v\n", ping)
}
}

View File

@ -1,10 +1,10 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.14.0
// protoc-gen-go v1.28.0
// protoc v3.21.1
// source: response.proto
package pb
package mcstatuspb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
@ -370,43 +370,48 @@ var File_response_proto protoreflect.FileDescriptor
var file_response_proto_rawDesc = []byte{
0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x02, 0x70, 0x62, 0x22, 0x8a, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x2e, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x2e, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72,
0x73, 0x12, 0x3a, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a,
0x07, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x1a, 0x96, 0x01, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x10,
0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x61, 0x78,
0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x2e, 0x53,
0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x06, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x2c, 0x0a,
0x06, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x74, 0x0a, 0x0b, 0x44,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x05, 0x65, 0x78,
0x74, 0x72, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61,
0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x74, 0x65, 0x78, 0x74, 0x1a, 0x1b, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x12, 0x0a,
0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78,
0x74, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x30, 0x63, 0x64, 0x2e, 0x78, 0x79, 0x7a,
0x2f, 0x6d, 0x69, 0x63, 0x68, 0x61, 0x65, 0x6c, 0x2f, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x12, 0x11, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x22, 0xd6, 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x3d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x3d, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x6c,
0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x49,
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x76,
0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x76, 0x69,
0x63, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0xa5,
0x01, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61,
0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x16, 0x0a, 0x06,
0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x6e,
0x6c, 0x69, 0x6e, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x2e, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x52, 0x06, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x2c, 0x0a, 0x06, 0x53, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x1a, 0x83, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45,
0x78, 0x74, 0x72, 0x61, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x1a,
0x1b, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x42, 0x29, 0x5a, 0x27,
0x67, 0x69, 0x74, 0x2e, 0x30, 0x63, 0x64, 0x2e, 0x78, 0x79, 0x7a, 0x2f, 0x6d, 0x69, 0x63, 0x68,
0x61, 0x65, 0x6c, 0x2f, 0x6d, 0x63, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x6d, 0x63, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -423,19 +428,19 @@ func file_response_proto_rawDescGZIP() []byte {
var file_response_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_response_proto_goTypes = []interface{}{
(*Response)(nil), // 0: pb.Response
(*Response_Version)(nil), // 1: pb.Response.Version
(*Response_Players)(nil), // 2: pb.Response.Players
(*Response_Description)(nil), // 3: pb.Response.Description
(*Response_Players_Sample)(nil), // 4: pb.Response.Players.Sample
(*Response_Description_Extra)(nil), // 5: pb.Response.Description.Extra
(*Response)(nil), // 0: mcstatus.protobuf.Response
(*Response_Version)(nil), // 1: mcstatus.protobuf.Response.Version
(*Response_Players)(nil), // 2: mcstatus.protobuf.Response.Players
(*Response_Description)(nil), // 3: mcstatus.protobuf.Response.Description
(*Response_Players_Sample)(nil), // 4: mcstatus.protobuf.Response.Players.Sample
(*Response_Description_Extra)(nil), // 5: mcstatus.protobuf.Response.Description.Extra
}
var file_response_proto_depIdxs = []int32{
1, // 0: pb.Response.version:type_name -> pb.Response.Version
2, // 1: pb.Response.players:type_name -> pb.Response.Players
3, // 2: pb.Response.description:type_name -> pb.Response.Description
4, // 3: pb.Response.Players.sample:type_name -> pb.Response.Players.Sample
5, // 4: pb.Response.Description.extra:type_name -> pb.Response.Description.Extra
1, // 0: mcstatus.protobuf.Response.version:type_name -> mcstatus.protobuf.Response.Version
2, // 1: mcstatus.protobuf.Response.players:type_name -> mcstatus.protobuf.Response.Players
3, // 2: mcstatus.protobuf.Response.description:type_name -> mcstatus.protobuf.Response.Description
4, // 3: mcstatus.protobuf.Response.Players.sample:type_name -> mcstatus.protobuf.Response.Players.Sample
5, // 4: mcstatus.protobuf.Response.Description.extra:type_name -> mcstatus.protobuf.Response.Description.Extra
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name

View File

@ -1,8 +1,8 @@
syntax="proto3";
package pb;
package mcstatus.protobuf;
option go_package = "git.0cd.xyz/michael/mcstatus/pb";
option go_package = "git.0cd.xyz/michael/mcstatus/mcstatuspb";
message Response {
message Version {