From 8679275090e99c66e7026b0bb521e36058e6f90d Mon Sep 17 00:00:00 2001 From: Andrew Tian Date: Mon, 12 Aug 2013 22:53:50 -0500 Subject: [PATCH] Fix doc example typo --- doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.go b/doc.go index 0a6ecd1bd..dad217f61 100644 --- a/doc.go +++ b/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)