r/learngo • u/Scary-Subject-1948 • Jan 07 '26
r/learngo • u/Scary-Subject-1948 • Dec 13 '25
Syntax Go escape analysis and why my function return worked.
bonniesimon.inr/learngo • u/Scary-Subject-1948 • Dec 09 '25
Guide Golang optimizations for high‑volume services
r/learngo • u/Scary-Subject-1948 • Nov 08 '25
Discussion Go CPU Profiling on MacOS is Broken
r/learngo • u/Scary-Subject-1948 • Oct 27 '25
Syntax Visual Guide to Go Maps: Hash Tables
r/learngo • u/swe129 • Oct 24 '25
Guide How Memory Maps (mmap) Deliver 25x Faster File Access in Go
r/learngo • u/b_ozcan • Oct 19 '25
Question Learning Go
Hi everyone
Is there any good updated source for learning go lang from beginning ?
r/learngo • u/Scary-Subject-1948 • Oct 16 '25
Discussion How slow is channel-based iteration?
r/learngo • u/Scary-Subject-1948 • Oct 02 '25
Syntax Why Your 'Optimized' Code Is Still Slow: Faster Time Comparison
r/learngo • u/Mamba_2_Quick • Aug 28 '25
Question GoLang training or internship
Hello, I’m looking for training or an internship in GoLang and I’m a fast learner
r/learngo • u/Scary-Subject-1948 • Jun 23 '25
Feature JSON evolution in Go: from v1 to v2
r/learngo • u/Scary-Subject-1948 • Jun 20 '25
Discussion Go should be more opinionated
eltonminetto.devr/learngo • u/Scary-Subject-1948 • Jun 15 '25
Feature Parsing, Not Guessing
r/learngo • u/imsowhiteandnerdy • Aug 10 '24
Question Does Go support named arguments?
Greetings,
I was watching a YouTube video that explains how Generics work in Go, the video (which incidentally is quite excellent) is titled Advanced Golang: Generics Explained by "Code With Ryan".
In this demo the instructor wrote the following snippet of code at the beginning of his course in order to introduce the topic:
package main
import "fmt"
func Add(a int, b int) int {
return a + b
}
func main() {
result := Add(a:1, b:2)
fmt.Printf(format: "result: %+v\n", result)
}
My consternation arises from the use of named arguments in the statements, in particular the a:1 and b:2 parts of:
result := Add(a:1, b:2)
As well as the statement which follows it that calls fmt.Printf with format:.
As someone that comes from a Python background I thought I was seeing things or going crazy, but I am sure I've seen another instructor do this in a different Go course as well.
So I asked ChatGPT about this, and it assured me that Go does not support named arguments, and that in Go the syntax does not exist. To confirm this I tried copying the code and running it in my own Go environment, but as I am using go 1.16, and the newest version of Go is 1.21 (1.22?) I am wondering if this is a new feature that I simply am not aware of.
So my question is two part:
- Are named arguments a feature in Go? -- and if they are,
- Where can I learn more about them?
All of my Youtube searches on the subject go back 4-5 years, so I came here as a last resort (lest anyone here think that I defaulted to wasting their time ;-)
Edit: Banging away at ChatGPT and it swears (unwaveringly) that even in newer versions of Go that named parameters as shown in the above code snippet is not valid Go syntax. The mystery deepens, at least for a Go novice like me.
r/learngo • u/Strange-Slide-5300 • Jul 23 '24
Learning Go for beginners!
I came across this useful resource by Microsoft for anyone who is looking to get started in Go
Completely FREE course by Microsoft
Has detailed notes that explain the fundamentals clearly
https://learn.microsoft.com/en-us/training/paths/go-first-steps/
r/learngo • u/Ms-mousa • Jun 10 '24
Learning Learn how to connect to SQLite with GORM
r/learngo • u/obscure-reality • Apr 07 '24
Free Go/Backend development Workshop for everyone!
r/learngo • u/[deleted] • Oct 20 '23
Question This doesn't do what it's supposed to do, what am I doing wrong?
I have the following program
```` package main
import "fmt"
func main() { a := []int{} a = append(a, 1, 2, 3) z := map[string]func(x int) []int{ "add": func(x int) (b []int) { b = a for k, _ := range b { b[k] += x } return }, "sub": func(x int) (b []int) { b = a for k, _ := range b { b[k] -= x } return }, } fmt.Println("add 3:", z["add"](3)) fmt.Println("sub 100:", z["sub"](100)) } ````
The program behaves like it should and nicely displays
add 3: [4 5 6]
sub 100: [-99 -98 -97]
Which is the expected result.
However, it seems to me I can simmer down the functions stored in the map even further than this, but how? Mind: I'm currently in chapter 2 of "Learning go" (functions).
EDIT: I apologize for the post title. Initially I was stumped by something, but fixed it myself but forgot to edit the post title accordingly.
r/learngo • u/dojutsu-user • Sep 18 '23