From 5ecf1a3bbafd5726e1cc90ff04db55fba42a86b9 Mon Sep 17 00:00:00 2001 From: tsasser05 <28053338+tsasser05@users.noreply.github.com> Date: Sat, 27 Nov 2021 15:21:17 -0500 Subject: Update documentation for expensiveComputation() (#4269) Added comment for clarity --- go.html.markdown | 1 + 1 file changed, 1 insertion(+) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 5a9214b0..2a3fae8e 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -190,6 +190,7 @@ func learnMemory() (p, q *int) { return &s[3], &r // & takes the address of an object. } +// Use the aliased math library (see imports, above) func expensiveComputation() float64 { return m.Exp(10) } -- cgit v1.2.3 From ac212cb879f4ed6a87898fc4692573e190cbbcf7 Mon Sep 17 00:00:00 2001 From: Connor Morrison <46800178+AllSeerEye@users.noreply.github.com> Date: Thu, 9 Dec 2021 15:43:57 -0700 Subject: Update go.html.markdown (#4284) --- 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 2a3fae8e..86b0f21b 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -179,7 +179,7 @@ func learnNamedReturns(x, y int) (z int) { // Go is fully garbage collected. It has pointers but no pointer arithmetic. // You can make a mistake with a nil pointer, but not by incrementing a pointer. -// Unlike in C/Cpp taking and returning an address of a local varible is also safe. +// Unlike in C/Cpp taking and returning an address of a local variable is also safe. func learnMemory() (p, q *int) { // Named return values p and q have type pointer to int. p = new(int) // Built-in function new allocates memory. -- cgit v1.2.3 From 800dad49e6f122a382012b0df530a729194875a3 Mon Sep 17 00:00:00 2001 From: Mayur Dave Date: Mon, 3 Jan 2022 15:50:15 +0000 Subject: [go/en] render bullet points correctly (#4294) --- go.html.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 86b0f21b..dfbfc374 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -475,8 +475,9 @@ documentation](http://golang.org/pkg/) and the source code comes up! Another great resource to learn Go is [Go by example](https://gobyexample.com/). There are many excellent conference talks and video tutorials on Go available on YouTube, and here are three playlists of the very best, tailored for beginners, intermediate, and advanced Gophers respectively: -* [Golang University 101](https://www.youtube.com/playlist?list=PLEcwzBXTPUE9V1o8mZdC9tNnRZaTgI-1P) introduces fundamental Go concepts and shows you how to use the Go tools to create and manage Go code -* [Golang University 201](https://www.youtube.com/playlist?list=PLEcwzBXTPUE_5m_JaMXmGEFgduH8EsuTs) steps it up a notch, explaining important techniques like testing, web services, and APIs -* [Golang University 301](https://www.youtube.com/watch?v=YHRO5WQGh0k&list=PLEcwzBXTPUE8KvXRFmmfPEUmKoy9LfmAf) dives into more advanced topics like the Go scheduler, implementation of maps and channels, and optimisation techniques + +- [Golang University 101](https://www.youtube.com/playlist?list=PLEcwzBXTPUE9V1o8mZdC9tNnRZaTgI-1P) introduces fundamental Go concepts and shows you how to use the Go tools to create and manage Go code +- [Golang University 201](https://www.youtube.com/playlist?list=PLEcwzBXTPUE_5m_JaMXmGEFgduH8EsuTs) steps it up a notch, explaining important techniques like testing, web services, and APIs +- [Golang University 301](https://www.youtube.com/watch?v=YHRO5WQGh0k&list=PLEcwzBXTPUE8KvXRFmmfPEUmKoy9LfmAf) dives into more advanced topics like the Go scheduler, implementation of maps and channels, and optimisation techniques Go Mobile adds support for mobile platforms (Android and iOS). You can write all-Go native mobile apps or write a library that contains bindings from a Go package, which can be invoked via Java (Android) and Objective-C (iOS). Check out the [Go Mobile page](https://github.com/golang/go/wiki/Mobile) for more information. -- cgit v1.2.3 From a53abc23e255f697bd6d127653a3f3718cbdaaca Mon Sep 17 00:00:00 2001 From: Adam Chalkley <36716992+atc0005@users.noreply.github.com> Date: Thu, 3 Mar 2022 21:29:48 -0600 Subject: [go/en] Fix link to Golang University 301 playlist (#4317) Co-authored-by: Adam Chalkley --- 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 dfbfc374..39c8ac74 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -478,6 +478,6 @@ There are many excellent conference talks and video tutorials on Go available on - [Golang University 101](https://www.youtube.com/playlist?list=PLEcwzBXTPUE9V1o8mZdC9tNnRZaTgI-1P) introduces fundamental Go concepts and shows you how to use the Go tools to create and manage Go code - [Golang University 201](https://www.youtube.com/playlist?list=PLEcwzBXTPUE_5m_JaMXmGEFgduH8EsuTs) steps it up a notch, explaining important techniques like testing, web services, and APIs -- [Golang University 301](https://www.youtube.com/watch?v=YHRO5WQGh0k&list=PLEcwzBXTPUE8KvXRFmmfPEUmKoy9LfmAf) dives into more advanced topics like the Go scheduler, implementation of maps and channels, and optimisation techniques +- [Golang University 301](https://www.youtube.com/playlist?list=PLEcwzBXTPUE8KvXRFmmfPEUmKoy9LfmAf) dives into more advanced topics like the Go scheduler, implementation of maps and channels, and optimisation techniques Go Mobile adds support for mobile platforms (Android and iOS). You can write all-Go native mobile apps or write a library that contains bindings from a Go package, which can be invoked via Java (Android) and Objective-C (iOS). Check out the [Go Mobile page](https://github.com/golang/go/wiki/Mobile) for more information. -- cgit v1.2.3 From d07aae1b684ee71ad88a03e21ff175a734133674 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 2 Aug 2022 13:04:17 -0400 Subject: Update go.html.markdown correcting a tiny mistake --- 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 39c8ac74..c040b3ee 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -46,7 +46,7 @@ package main import ( "fmt" // A package in the Go standard library. "io/ioutil" // Implements some I/O utility functions. - m "math" // Math library with local alias m. + "math" // Math library with local alias m. "net/http" // Yes, a web server! "os" // OS functions like working with the file system "strconv" // String conversions. -- cgit v1.2.3 From fd802bfd4380c90530c084267a23b8fd1344f374 Mon Sep 17 00:00:00 2001 From: zjzj1996 Date: Wed, 11 Jan 2023 15:10:03 +0800 Subject: fix:typo --- 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 c040b3ee..fe69ed43 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -39,7 +39,7 @@ Go comes with a good standard library and a sizeable community. // +build prod, dev, test // A package clause starts every source file. -// Main is a special name declaring an executable rather than a library. +// main is a special name declaring an executable rather than a library. package main // Import declaration declares library packages referenced in this file. -- cgit v1.2.3 From 08558182f5c3cf5e2296e685ad68dbef025911a9 Mon Sep 17 00:00:00 2001 From: Tavis <5178311+tavislikedavis@users.noreply.github.com> Date: Thu, 24 Aug 2023 23:13:00 -0500 Subject: Fix go math library alias (#4702) Fix go math library alias --- 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 fe69ed43..9dbfefaa 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -46,7 +46,7 @@ package main import ( "fmt" // A package in the Go standard library. "io/ioutil" // Implements some I/O utility functions. - "math" // Math library with local alias m. + m "math" // Math library with local alias m. "net/http" // Yes, a web server! "os" // OS functions like working with the file system "strconv" // String conversions. -- cgit v1.2.3 From 8498d0254a139e037eecac2acc389785a74a56c7 Mon Sep 17 00:00:00 2001 From: Muhammad Rafay Nadeem <113093783+mrafnadeem-apimatic@users.noreply.github.com> Date: Sat, 27 Jan 2024 02:29:13 +0500 Subject: Update go.html.markdown with simpler wording (#4829) --- 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 9dbfefaa..2eb40939 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -357,7 +357,7 @@ func learnInterfaces() { // Functions can have variadic parameters. func learnVariadicParams(myStrings ...interface{}) { // Iterate each value of the variadic. - // The underbar here is ignoring the index argument of the array. + // The underscore here is ignoring the index argument of the array. for _, param := range myStrings { fmt.Println("param:", param) } -- cgit v1.2.3 From 1c33cd1a9a09b310937f753920ccd149550a71c2 Mon Sep 17 00:00:00 2001 From: qlikwer Date: Mon, 12 Feb 2024 16:58:50 +0500 Subject: Update go.html.markdown (#4838) corrected an error in the number pi --- 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 2eb40939..d6468f58 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -95,7 +95,7 @@ can include line breaks.` // Same string type. // Non-ASCII literal. Go source is UTF-8. g := 'Σ' // rune type, an alias for int32, holds a unicode code point. - f := 3.14195 // float64, an IEEE-754 64-bit floating point number. + f := 3.14159 // float64, an IEEE-754 64-bit floating point number. c := 3 + 4i // complex128, represented internally with two float64's. // var syntax with initializers. -- cgit v1.2.3 From 16fa336a43a16c9515cdaa8a18276b05f47f3ffe Mon Sep 17 00:00:00 2001 From: Ricardo Islas Ruiz Date: Sun, 25 Feb 2024 14:46:12 -0700 Subject: [go/en]: Clarify comment related to the append function in slices. (#4780) --- 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 d6468f58..0631ffab 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -130,7 +130,7 @@ can include line breaks.` // Same string type. // Because they are dynamic, slices can be appended to on-demand. // To append elements to a slice, the built-in append() function is used. // First argument is a slice to which we are appending. Commonly, - // the array variable is updated in place, as in example below. + // the slice variable is updated in place, as in example below. s := []int{1, 2, 3} // Result is a slice of length 3. s = append(s, 4, 5, 6) // Added 3 elements. Slice now has length of 6. fmt.Println(s) // Updated slice is now [1 2 3 4 5 6] -- cgit v1.2.3 From c2878077cb0b08b47506787bf719b1430e5a6b42 Mon Sep 17 00:00:00 2001 From: Kelli Rockwell Date: Mon, 1 Apr 2024 00:35:55 -0700 Subject: Update Go official site links from golang.org -> go.dev (#4871) --- go.html.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'go.html.markdown') diff --git a/go.html.markdown b/go.html.markdown index 0631ffab..59ba2e4f 100644 --- a/go.html.markdown +++ b/go.html.markdown @@ -456,21 +456,21 @@ func requestServer() { ## Further Reading -The root of all things Go is the [official Go web site](http://golang.org/). +The root of all things Go is the [official Go web site](https://go.dev/). There you can follow the tutorial, play interactively, and read lots. -Aside from a tour, [the docs](https://golang.org/doc/) contain information on +Aside from a tour, [the docs](https://go.dev/doc/) contain information on how to write clean and effective Go code, package and command docs, and release history. -The [Go language specification](https://golang.org/ref/spec) itself is highly recommended. It's easy to read +The [Go language specification](https://go.dev/ref/spec) itself is highly recommended. It's easy to read and amazingly short (as language definitions go these days.) -You can play around with the code on [Go playground](https://play.golang.org/p/tnWMjr16Mm). Try to change it and run it from your browser! Note that you can use [https://play.golang.org](https://play.golang.org) as a [REPL](https://en.wikipedia.org/wiki/Read-eval-print_loop) to test things and code in your browser, without even installing Go. +You can play around with the code on [Go playground](https://go.dev/play/p/tnWMjr16Mm). Try to change it and run it from your browser! Note that you can use [https://go.dev/play/](https://go.dev/play/) as a [REPL](https://en.wikipedia.org/wiki/Read-eval-print_loop) to test things and code in your browser, without even installing Go. On the reading list for students of Go is the [source code to the standard -library](http://golang.org/src/pkg/). Comprehensively documented, it +library](https://go.dev/src/). 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! +documentation](https://go.dev/pkg/) and the source code comes up! Another great resource to learn Go is [Go by example](https://gobyexample.com/). -- cgit v1.2.3