From dde956286abf4e90f74cbbb773c57c7838d6b812 Mon Sep 17 00:00:00 2001 From: Jens Rantil Date: Wed, 4 Sep 2013 09:37:26 +0200 Subject: parens => parentheses --- go.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 4db76a49..5d5d974b 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -46,7 +46,7 @@ func main() { } // Functions have parameters in parentheses. -// If there are no parameters, empty parens are still required. +// If there are no parameters, empty parentheses are still required. func beyondHello() { var x int // Variable declaration. Variables must be declared before use. x = 3 // Variable assignment. -- cgit v1.2.3 From abb903caba70b2813cc2194d294ee8e802dbec15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C5=A0uppa?= Date: Wed, 4 Sep 2013 11:30:50 +0200 Subject: chan chan string -> channel of string channels --- go.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 4db76a49..9ffe9ed5 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -251,7 +251,7 @@ func learnConcurrency() { fmt.Println(<-c, <-c, <-c) // channel on right, <- is "receive" operator. cs := make(chan string) // another channel, this one handles strings. - cc := make(chan chan string) // a channel of channels. + cc := make(chan chan string) // a channel of string channels. go func() { c <- 84 }() // start a new goroutine just to send a value go func() { cs <- "wordy" }() // again, for cs this time // Select has syntax like a switch statement but each case involves -- cgit v1.2.3 From 284f1ea407b576dad1b92bc59d9330c608b7adf6 Mon Sep 17 00:00:00 2001 From: NKCSS Date: Wed, 4 Sep 2013 11:52:57 +0200 Subject: 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) --- go.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'go.html.markdown') 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. -- cgit v1.2.3 From 078f6bbc9d3677c497a54c9286dc692a0cf815a7 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Wed, 4 Sep 2013 13:39:02 +0100 Subject: =?UTF-8?q?Corrected=20comment:=20utf-8=20=E2=86=92=20unicode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Runes hold the raw unicode code point, not utf-8. Storing utf-8 inside of a uint32 would be highly inefficient. Runes are essentially utf-32. --- go.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 4db76a49..d7622ded 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -71,7 +71,7 @@ func learnTypes() { can include line breaks.` // same string type // non-ASCII literal. Go source is UTF-8. - g := 'Σ' // rune type, an alias for uint32, holds a UTF-8 code point + g := 'Σ' // rune type, an alias for uint32, holds a unicode code point f := 3.14195 // float64, an IEEE-754 64-bit floating point number c := 3 + 4i // complex128, represented internally with two float64s -- cgit v1.2.3 From febe5f499465edfed92aeea5e9349a660b8d5f7d Mon Sep 17 00:00:00 2001 From: Matthew Wyatt Date: Wed, 4 Sep 2013 20:46:45 -0700 Subject: Added links to source and package documentation. Also reformatted line lengths to accommdate links. --- go.html.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 3a3800dd..eec03845 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -294,8 +294,9 @@ There you can follow the tutorial, play interactively, and read lots. The language definition itself is highly recommended. It's easy to read and amazingly short (as language definitions go these days.) -On the reading list for students of Go is the source code to the standard -library. Comprehensively documented, it demonstrates the best of readable -and understandable Go, Go style, and Go idioms. Click on a function name -in the documentation and the source code comes up! +On the reading list for students of Go is the [source code to the standard +library](http://golang.org/src/pkg/). Comprehensively documented, it +demonstrates the best of readable and understandable Go, Go style, and Go +idioms. Or you can click on a function name in [the +documentation](http://golang.org/pkg/) and the source code comes up! -- cgit v1.2.3 From a933d419e07fd8af6effa89200b581e904c61679 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 8 Sep 2013 21:52:47 -0700 Subject: Some fixes --- go.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 3a3800dd..6eb8d57d 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -1,4 +1,4 @@ ---- +--- name: Go category: language language: Go -- cgit v1.2.3