r/golang2 • • Jul 01 '24

Can anyone explain why the dollar sign is printed outside the curly braces?

Post image
7 Upvotes

Hello golang2,

The title is the question. Intuitively I would think the dollar sign would be printed inside the curly braces, I can't figure out why it's being printed outside of them.

Thanks


r/golang2 • • Jun 23 '23

We're open

7 Upvotes

Hello, Gophers. In case you stumbled upon this sub just now, remember that we are providing an alternative platform to express yourself, share knowledge and promote your Go stuff.

We should keep the community spirit alive, and gatekeeping of any sort is not welcome in r/golang2

Alright, let's get back to work.


r/golang2 • • Mar 27 '19

Made with go

5 Upvotes

Go for beginners, a website with go resources:

https://madewithgolang.com/


r/golang2 • • Oct 27 '24

How to Implement Server-Sent Events in Go

Thumbnail
youtube.com
4 Upvotes

r/golang2 • • Aug 26 '24

I asked my boss for a raise. And he said I should Go

Post image
4 Upvotes

r/golang2 • • Mar 04 '24

Remote Sr. Go/Golang Engineer Opportunity - Remote/W2/EST/long-term contract

4 Upvotes

Seeking a Senior Go/Golang Engineer to join our team in a fully remote, long-term contract opportunity.

  • W-2 only (no C2C/sponsorship)

  • Must live/work within the continental US

  • Full-time - 40 hrs/week - EST business hours with no other simultaneous work commitments

Some of the tech stack requirements for this opportunity: Go / RESTful APIs / Microservices / GORM

Compensation ranges from $55-70/hr

Please reach out/comment if you’re interested in learning more!


r/golang2 • • Nov 17 '25

Introducing GONK – an ultra-lightweight, edge-native API Gateway (single <20MB binary, no deps)

Thumbnail
github.com
3 Upvotes

Hey everyone! I’ve been working on something I think a lot of people here might appreciate — especially if you’re into self-hosting, edge computing, IoT, or just hate bloated infra.

What is GONK? GONK is an ultra-lightweight, privacy-first, edge-native API Gateway written in Go. It’s built for environments where traditional gateways (Kong, Envoy, Traefik, Nginx) are too heavy, too complex, or too cloud-dependent.

Think factory floors, air-gapped networks, Raspberry Pis, industrial devices, or minimal microservice stacks.

  • Single binary <20MB

  • No external dependencies

  • No telemetry, no phone-home

  • Runs fast even on a Pi

Why I built it Most gateways today assume:

you have Kubernetes

you have a cloud control plane

you don’t care about resources

you’re okay with telemetry and phoning home

But in industrial and IoT environments, this is unacceptable. People need something simple, transparent, offline, and extremely efficient.

So I built GONK with a few core principles:

Edge-first

Privacy-first

Minimal resource usage

Enterprise-grade features without enterprise complexity

Features (highlights) Protocols

HTTP/1.1, HTTP/2, HTTPS

WebSocket (ws/wss)

gRPC proxying

Automatic protocol detection

Routing

Path-based routing (/api/*)

Header and method-based routing

Virtual hosts

Route priorities + weights

Security

Built-in JWT validation (HS256/RS256)

API Key authentication

Per-route and global rate limiting

CORS per route

Performance & Resilience

Circuit breakers

Retries with backoff

Response caching

Connection pooling

Hot reloadable config

Observability

Prometheus metrics

Structured logging

Request tracing & correlation IDs

Health endpoints

Transformations

Add/remove headers

Path rewriting/stripping

Query injection

Dynamic variables (${request_id}, ${remote_addr}, etc.)

Benchmarks Raspberry Pi 4 (4GB)

10,325 req/s HTTP proxy

5,500 req/s with JWT validation

~2ms avg latency on 1000 WebSocket clients

~47MB memory under heavy load

~12MB idle

Intel i7-9700K

115,839 req/s with caching enabled

~48MB RAM at 10K req/s sustained

It’s not meant to beat Nginx in raw throughput, but it runs close while using a fraction of the resources.

Example Configuration (simple) server: listen: ":8080"

routes:

  • name: "api" path: "/api/*" upstream: "http://backend:3000" strip_path: true

Start it with:

./gonk -config gonk.yaml

Docker / Kubernetes There’s a Docker image (ghcr.io/JustVugg/gonk) and a basic Kubernetes deployment + Helm chart available.

Use cases

Edge IoT gateway on Raspberry Pi / Jetson

Industrial environments (air-gapped)

Lightweight microservice gateway

WebSocket fanout layer

API monetization (per-client rate limits)

“Local cloud” setups in homelabs

Feedback welcome! I built GONK because I needed a gateway that:

doesn’t need a database

doesn’t need a control plane

doesn’t eat 500MB of RAM

doesn’t phone home

doesn’t require learning Envoy’s 1,200-page config model

If this sounds interesting, let me know what features you'd want next. Happy to answer questions or hear critiques!


r/golang2 • • Nov 06 '25

Building a simple terminal-based log viewer in Go (eventually evolving into a text editor).

3 Upvotes

Hello everyone, So I am new to Go, but not new to programming. I am a software engineer working with JS. I am now transitioning to Go for a low level system experience as well as backend engineering. I am currently working on a simple log/file viewer for myself. My VSCode crashes when I open large server logs, so to solve this is issue I using glogg for opening logs but now I am thinking of building a simple tool for myself. So I tried making one, though it's very basic at the moment, I am currently implementing features like pagination, scrolling, searching or highlighting. Also later will be coverting it to a simple terminal text editor too. So any suggestions or feedback is highly welcome.

P.S. - GitHub link for the project : https://github.com/HarshDev1809/log-go


r/golang2 • • Sep 25 '25

How to detect a slow memory leak in golang binary??

Thumbnail reddit.com
3 Upvotes

r/golang2 • • Nov 17 '24

Developing a Terminal App in Go with Bubble Tea

Thumbnail
youtube.com
3 Upvotes

r/golang2 • • Oct 19 '24

Fuzz Testing in Go

Thumbnail
youtube.com
3 Upvotes

r/golang2 • • Oct 15 '24

How to work with GitHub API in Go

Thumbnail
youtube.com
3 Upvotes

r/golang2 • • May 17 '24

Golang jobs in Europe

3 Upvotes

Hello everyone, I'm seeking your advice. I currently reside in India and have around one year of experience working with Go. My overall work experience is 10 years, (call center then to service desk then incident management and now into infrastructure monitoring. I primarily use Go for scripting and have knowledge of cloud infrastructure and Terraform, I know I am lacking substantial development experience however if I aspire to pursue Go developer positions in Europe, what additional technologies and tools should I aim to become proficient in and which countries should aim for ?

I would really appreciate your advise ! thank you.


r/golang2 • • Apr 19 '24

Go-web-setup boiler plate

3 Upvotes

🎉 Thrilled to introduce an open-source project, go-web-setup, created by my friend. It's a dynamic development template tailored for Golang web applications, featuring a powerhouse combination of Echo, sqlx, sql-migrate, and zap for a streamlined development journey. Dive into its brilliance on GitHub and join us in nurturing its evolution! 🚀

Go-web-setup

Please star and share the repo to anyone who could use it thank you. 😃


r/golang2 • • Jan 25 '24

Some advice needed as i am about to start my first ever job

3 Upvotes

Hey guys!
I am a fresher and am about to start a job(internship) as a Backend Developer(Golang) which will be my first ever job. I am tense as even though I got the job, I might flunk. So, I wanted experiences from you guys. Like problems you all faced, how did you solve it?
experiencing a new codebase, a new framework, building a feature like things to consider while developing a Login feature, bugs in production introduced by someone else and sometimes introduced by yourself, giving code reviews, and giving feedback.

Can you tell me about experiences you all faced as a fresher with some tips, not only figuratively but with the solutions you came up with technically?

I was looking for some stories from people when they started as a fresher, it is fun and educational to read about it.

Thanks!


r/golang2 • • Mar 12 '23

Title: GoConsole: a lightweight Go module for creating command-line commands

3 Upvotes

Hi everyone,

I'm excited to share my latest project, GoConsole, with the Go community. GoConsole is a lightweight Go module that makes it easy to create command-line commands, following the docopt standard. It also provides helpers for styling the command's output, asking questions, and rendering tables.

As a Go enthusiast, I'm looking for feedback and suggestions on how to improve GoConsole. I'm also curious to know if there are any similar modules out there that you've used or know of.

Here's the link to the project's GitHub repository: https://github.com/DrSmithFr/go-console

Thank you in advance for your help!


r/golang2 • • Oct 03 '22

What is the Best Way to Learn Golang?

Thumbnail
zxq.net
3 Upvotes

r/golang2 • • Sep 01 '22

Golang Vs Python – Speed Comparison

Thumbnail
techhrk.com
3 Upvotes

r/golang2 • • Dec 30 '21

Golang itoa: How to use strconv.Itoa() Function

Thumbnail
askgolang.com
3 Upvotes

r/golang2 • • Sep 06 '21

Elixir inspired me to try and replicate pipes in Go, using the upcoming generics

Thumbnail
preslav.me
3 Upvotes

r/golang2 • • Jan 29 '21

CURSO DE GO 2021 #6 Creando Nuestro Primer Comando

Thumbnail
youtu.be
3 Upvotes

r/golang2 • • Dec 05 '20

Golang gopher and cyberpunk style

Post image
3 Upvotes

r/golang2 • • Aug 21 '20

Gate: The extensible Minecraft proxy written in Go!

3 Upvotes

Today, I want to present "Gate", the extensible Minecraft proxy, to the Gophers part of the Minecraft community!

https://www.reddit.com/r/golang/comments/ideg2v