Skip to main content

Questions tagged [go]

Go, also called golang, is an open source programming language initially developed at Google. It is a statically-typed language with syntax loosely derived from that of C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library.

1 vote
1 answer
181 views

Had a discussion today in how to implement services that work with messages coming in from event queues. We call these services processors. One of us argues for using several functions, while the ...
4 votes
2 answers
732 views

I just learned about the Functional Options pattern in golang. what are the benefits of using it over just allowing to pass a config struct and just overriding the default values provided in the ...
5 votes
2 answers
1k views

I'm trying to get hands-on experience with Uncle Bob's Clean Architecture in Go, but I'm running into some issues. Also, I'm not yet familiar with all of Go's idioms. For testing purposes, I'm ...
0 votes
2 answers
245 views

I've been at my current job for about 4-5 months, mainly working with Go, and I have no prior experience with Kafka. Before this, my background was in JavaScript, Node.js, React, etc. I recently got a ...
1 vote
4 answers
8k views

We're trying to write Go in the most possibile idiomatic way, but sometimes we struggle to find which is the best way. For example in our service we're creating/converting a struct from another one: ...
1 vote
1 answer
115 views

The title Go, Error Handling, and Big Text Files is a blog post from Wesley Aptekar-Cassels from 2021. In this blog post he reports about a problem he faced parsing long text files. He tried scanner :=...
22 votes
5 answers
11k views

I've always thought that a "common library" was a good idea. By that I mean a library that contains the common functionality that is often needed by a few different applications. It results in less ...
1 vote
1 answer
261 views

As far as I understand (not much), the archival .a file is just, roughly speaking, the collection/batch of object .o files. It's like a library of compiled code that can be cached and which can be ...
1 vote
1 answer
513 views

I have an endpoint similar to GET ../produtcs/123 where 123 stands for an ID. The REST service response with either status 200 and a json object A {"deliveryData": {"status": 200, ...
18 votes
5 answers
23k views

On the closest thing Golang has to a style guide found here, under Receiver Names this is written: The name of a method's receiver should be a reflection of its identity; often a one or two letter ...
3 votes
1 answer
398 views

I have read this article which indicates a double tuple structure, but it is unfortunately light on implementation details, which is what I am looking for. So... how are interfaces implemented in Go? ...
1 vote
1 answer
136 views

I have a process in golang that I want to kickoff through a RPC call but then have the function return early whilst the process continues in the background. Specifically it’s just a basic db transfer ...
4 votes
5 answers
2k views

I was reading about composition over inheritance and came across a question about solving the Circle-Ellipse Problem in Object-Oriented Programming. This kind of problem is often used as an example of ...
1 vote
1 answer
362 views

I have a little bit of experience with Go, that I have been trying to use as a reference point to wrap my mind around Rust via a cards game I wrote in Go that I would like to now write in Rust. I know ...
-2 votes
1 answer
544 views

I have few questions on the go's answer to c10K problem. How is an event loop different from the network poller described in this blog? I see a striking similarity between waiting threads and waiting ...

15 30 50 per page
1
2 3 4 5
12