Skip to content

Commit e45938d

Browse files
committed
Change ProtocolVersion field to int
1 parent 3b72f45 commit e45938d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The response to the command is:
3131
```json
3232
{
3333
"eventType": "hello",
34-
"protocolVersion": "1",
34+
"protocolVersion": 1,
3535
"message": "OK"
3636
}
3737
```

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func main() {
8181
// fmt.Println("Req. Protocol version:", reqProtocolVersion)
8282
output(&helloMessageJSON{
8383
EventType: "hello",
84-
ProtocolVersion: "1", // Protocol version 1 is the only supported for now...
84+
ProtocolVersion: 1, // Protocol version 1 is the only supported for now...
8585
Message: "OK",
8686
})
8787
case "START":
@@ -187,7 +187,7 @@ func newBoardPortJSON(port *enumerator.PortDetails) *boardPortJSON {
187187

188188
type helloMessageJSON struct {
189189
EventType string `json:"eventType"`
190-
ProtocolVersion string `json:"protocolVersion"`
190+
ProtocolVersion int `json:"protocolVersion"`
191191
Message string `json:"message"`
192192
}
193193

0 commit comments

Comments
 (0)