Fix doc example typo

This commit is contained in:
Andrew Tian 2013-08-12 22:53:50 -05:00
parent 335736e59f
commit 8679275090

2
doc.go
View file

@ -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)