Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
If you’re a developer, you’ve probably got a few deployments under your belt.
-
Let’s try a thought experiment: I’m a customer who has been burned by a bad vendor, and you’re a competing vendor trying to sell me your service.
-
When you send your most intimate data to an AI-platform, how do you know it’s not being shared with third parties?
-
A big part of programming is about making choices: What data type do I use?
-
In Go, testing HTTP handlers is more work than testing regular functions.
-
Go doesn’t offer a native set type, and the standard library doesn’t provide one either.
-
Coming from other languages it can be surprising that Go does not support string interpolation.
-
Back in March I began working on a Go web application called Househunt.
-
By default Go allows you to easily format, log or output values of most types.
-
Sometimes a declarative approach makes your code a lot clearer.
-
You know the saying “a good example is worth a thousand blog posts”?
-
Implementing HTTP handlers in Go can be a bit of a chore.
-
When dealing with HTTP based API’s it’s common to pass data using URL path parameters (also called path variables).
-
The JSON standard does not have a built in type for time, so time values are usually handled as strings.
-
It’s tempting to think of time (and dates by extension) as an ever increasing number.
-
In the documentation of Go’s time package you will find the term “monotonic clock” roughly 30 times.
-
Have you ever used time.Now() or ran a method like createdAt.Format(...)?
-
Every Go developer trips up on it at some point: parsing a date or time.
-
Have you run into an elaborate struct definition with a struct inside a struct?
-
You might find yourself needing to pass new data to a significant amount of functions in your code base.
-
Are you unsure how to pass trace IDs (or other request-scoped data) through your application stack?
-
Working with a lot of large structs in tests can be a bit of a pain.
-
In this series we’ve thus far seen only one way of creating slices: by slicing an existing array. food:= [4]string{"🍔", "🍕", "🍏", "🍊"} fruits := food[2:4] fmt.Println(fruits) // prints [🍏 🍊] Creating slices like this was useful to introduce and demonstra…
-
While writing Go, you might might run into the following situation: You want to collect the results of a function in a slice.
-
If you’re unfamiliar with Go slices, it might look like a good idea to pass around a pointer instead of the “entire collection”. s := []string{"👁", "👃", "👁"} doSomething(&s) andAgain(&s) However, this has no real upsides.
-
Did you know that append can turn broccoli into pizza?
-
When it comes to slices you can get pretty far without knowing how the sausage is made.
-
If you have used the context package in the standard library, you might have noticed that there are two constructors that create an empty context: context.Background() and context.TODO().
-
If you open your browser and load a web page, but press the “stop loading” or “X” button before it is fully loaded, the browser will abort any open requests.
-
When trying to use functions as Go http handlers, you will run into http.HandlerFunc from the net/http package.