Naveen Ramanathan

786 posts

Naveen Ramanathan

Naveen Ramanathan

@msgtonaveen

Founder https://t.co/T9hIJb0yME @bot_golang Building https://t.co/F61G8WjWR1

India Joined Haziran 2009
93 Following423 Followers
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
Go's ctx `WithoutCancel` function propagates values from the parent context and is not cancelled when the parent is cancelled. This is useful when a new goroutine wants the parent's values but should not be cancelled with the parent. Playground go.dev/play/p/mGqFKDa… #golang
golangbot tweet media
English
0
2
4
458
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#golang #tip You Go micro service can listen on multiple ports. One port can be for the public API and the other can be for internal APIs like metrics.
golangbot tweet media
English
2
7
64
2.7K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
Port nos below 1024 are considered privileged and need root access to listen on. It's a security nightmare to run web server as root Solution: Run the web server on a non privileged port(eg. 8080) behind a reverse proxy like nginx that starts on port 80 and then drops privileges
golangbot tweet media
English
0
1
2
541
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#golang #tip The port number `0` can be used to start a http server on a random available port. This is perfect for running unit tests where multiple web servers have to be started in parallel without port conflicts.
golangbot tweet media
English
0
2
76
3.2K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#golang #tip The standard library package `slog` has a `AddSource` handler option that adds the line number of the log statement to the log's output. Try it out: go.dev/play/p/asXniKy…
golangbot tweet media
English
2
12
106
5.4K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
Senior Software Developer Company: PerceptView Location: Boise, Idaho - USA | Remote available Salary: $120,000 - $165,000 Tech Stack: Go, Python, Svelte Role: Backend Go developer, creating a command and control system for CUAS Apply here: gojobs.run/jobs/senior-so… #golang #job
English
1
3
66
8.8K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
Starting from Go 1.26, the new function will also accept expressions as parameters. #golang #update
golangbot tweet media
English
5
12
187
7.8K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#golang #tip A subtlety in Go that trips up newbies - Adding elements to a nil slice will work, whereas adding elements to a nil map will panic at runtime. Try it out go.dev/play/p/mTbvqs9…
golangbot tweet media
English
5
3
48
7.8K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#db #poll Do you prefer singular or plural table names? Bonus points if you can comment on why you would choose either.
English
2
1
1
780
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
What will this program print? package main import "fmt" func main() { fmt.Printf("%d", 'A') } #golang #quiz
English
0
1
3
761
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#golang #quiz What will this program print?
golangbot tweet media
English
1
2
7
1.1K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
If there is a cyclic dependency between two packages in Go, first re-evaluate whether they really need to be separate packages. The easiest solution is often to just combine them since one cannot exist without the other. One package is simpler than two. #golang #tip
English
0
1
3
600
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#security #tip Two fundamental security principles that any web application should adhere to * Principle of least privilege - Grant only the intended permissions to users and machines * End to end encryption - Data protection from origin to destination
English
0
1
3
673
Naveen Ramanathan retweeted
GopherCon UK
GopherCon UK@gopherconuk·
Ready to climb the testing pyramid? 🧗‍♂️ At GopherCon UK 2025, Naveen Ramanathan gave a super practical talk 🧠 that breaks down the whole testing pyramid for services like S3. ☁️ 💻 His session, "Climbing the Testing Pyramid: From Real Service to Interface Mocks in Go" covers everything from using real services and simulating failures with Toxiproxy, to running local emulators like LocalStack, and finally automating your mocks with Mockery to make life easier. Head over to our YouTube channel to watch the replay. ▶️ @msgtonaveen @bot_golang
English
0
2
5
775
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
#golang #security #sqlinjection #tip Always use prepared statements when querying databases using user input. Never pass user input to SQL queries using string interpolation. This will lead to SQL injection attack.
golangbot tweet media
English
0
3
16
1.8K
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
These are all the startups/side projects I launched. In addition to these there are a quite a few for which I bought domains, coded them but never launched. Classic side project graveyard.
English
0
1
1
351
Naveen Ramanathan retweeted
golangbot
golangbot@bot_golang·
gojobs.run - My recent side project. A job board for Golang jobs. Has some traction but doesn't generate any significant income. I am going to let it grow and see where it goes!
English
1
1
1
439