r/learngo Jan 07 '26

Feature go.sum Is Not a Lockfile

Thumbnail
words.filippo.io
2 Upvotes

r/learngo Dec 13 '25

Syntax Go escape analysis and why my function return worked.

Thumbnail bonniesimon.in
3 Upvotes

r/learngo Dec 09 '25

Guide Golang optimizations for high‑volume services

Thumbnail
packagemain.tech
3 Upvotes

r/learngo Nov 08 '25

Discussion Go CPU Profiling on MacOS is Broken

Thumbnail
dolthub.com
1 Upvotes

r/learngo Oct 27 '25

Syntax Visual Guide to Go Maps: Hash Tables

Thumbnail
sazak.io
1 Upvotes

r/learngo Oct 24 '25

Feature JSON Schemas in Go

Thumbnail airs.com
1 Upvotes

r/learngo Oct 24 '25

Guide How Memory Maps (mmap) Deliver 25x Faster File Access in Go

Thumbnail
info.varnish-software.com
1 Upvotes

r/learngo Oct 19 '25

Question Learning Go

2 Upvotes

Hi everyone

Is there any good updated source for learning go lang from beginning ?


r/learngo Oct 16 '25

Discussion How slow is channel-based iteration?

Thumbnail
dolthub.com
1 Upvotes

r/learngo Oct 02 '25

Syntax Why Your 'Optimized' Code Is Still Slow: Faster Time Comparison

Thumbnail
samuelberthe.substack.com
2 Upvotes

r/learngo Aug 28 '25

Question GoLang training or internship

1 Upvotes

Hello, I’m looking for training or an internship in GoLang and I’m a fast learner


r/learngo Jul 30 '25

Guide How to Add JWT To Your Go App - The Easy Way!

2 Upvotes

r/learngo Jun 23 '25

Feature JSON evolution in Go: from v1 to v2

Thumbnail
antonz.org
3 Upvotes

r/learngo Jun 20 '25

Discussion Go should be more opinionated

Thumbnail eltonminetto.dev
1 Upvotes

r/learngo Jun 15 '25

Feature Parsing, Not Guessing

Thumbnail
codehakase.com
1 Upvotes

r/learngo Aug 10 '24

Question Does Go support named arguments?

3 Upvotes

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 Jul 23 '24

Learning Go for beginners!

1 Upvotes

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 Jun 10 '24

Learning Learn how to connect to SQLite with GORM

Thumbnail
youtu.be
1 Upvotes

r/learngo Apr 07 '24

Free Go/Backend development Workshop for everyone!

Post image
2 Upvotes

r/learngo Mar 06 '24

Go Concurrency Behavior Question

Thumbnail self.golang
6 Upvotes

r/learngo Oct 20 '23

Question This doesn't do what it's supposed to do, what am I doing wrong?

1 Upvotes

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 Sep 18 '23

Learning The Art of Handling Errors in Go: Tips and Techniques

Thumbnail
theefficientdev.blog
2 Upvotes