diff options
author | NKCSS <github@nickkusters.com> | 2013-09-04 11:52:57 +0200 |
---|---|---|
committer | NKCSS <github@nickkusters.com> | 2013-09-04 11:52:57 +0200 |
commit | 284f1ea407b576dad1b92bc59d9330c608b7adf6 (patch) | |
tree | 1830fb4763d85fed9454fe783feabf42e70ecfc9 /go.html.markdown | |
parent | 412b312c45ccb8922f92c4ee364819fb0add7734 (diff) |
Changed Print function to show the variable type
This is to follow the way the string value is presented, and the format
string is written (... is a ... infers a stype specification)
Diffstat (limited to 'go.html.markdown')
-rw-r--r-- | go.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/go.html.markdown b/go.html.markdown index 4db76a49..853775c4 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -1,4 +1,4 @@ ---- +--- name: Go category: language language: Go @@ -259,7 +259,7 @@ func learnConcurrency() { // that are ready to communicate. select { case i := <-c: // the value received can be assigned to a variable - fmt.Println("it's a", i) + fmt.Printf("it's a %T", i) case <-cs: // or the value received can be discarded fmt.Println("it's a string") case <-cc: // empty channel, not ready for communication. |