Fix doc example typo
This commit is contained in:
parent
335736e59f
commit
8679275090
1 changed files with 1 additions and 1 deletions
2
doc.go
2
doc.go
|
@ -96,7 +96,7 @@ switch or type assertion. An example of a type switch follows:
|
|||
|
||||
// Assumes msg is already a valid concrete message such as one created
|
||||
// via NewMsgVersion or read via ReadMessage.
|
||||
switch msg.(type) {
|
||||
switch msg := msg.(type) {
|
||||
case *btcwire.MsgVersion:
|
||||
// The message is a pointer to a MsgVersion struct.
|
||||
fmt.Printf("Protocol version: %v", msg.ProtocolVersion)
|
||||
|
|
Loading…
Reference in a new issue