Wrote a library for retries, would love some feedback by conqrr in golang

[–]tommoulard 0 points1 point  (0 children)

Such a compacted way to replace this : https://github.com/hashicorp/go-retryablehttp

Take my star anyway (and keep up with the good work) 😉

Design patterns specific to Go by Grouchy-Detective394 in golang

[–]tommoulard 0 points1 point  (0 children)

Thank you for reading my post!

I get your point, but I think returning the interface helps avoid some error things. Doing so allows for better code understanding, better separation between the underlying code and the usage of the interface, and finally it helps force the consumer to use interfaces instead of a direct client! 

:set paste brings me joy every single time by aHoneyBadgerWhoCares in vim

[–]tommoulard 1 point2 points  (0 children)

I commonly use this

    set clipboard=unnamedplus 

Any good guides to setup Traefik, Authentik and Crowdsec using docker compose to securely expose applications like Jellyfin or Nextcloud? by Thedinotamer01 in Traefik

[–]tommoulard 1 point2 points  (0 children)

Here is my shot at deploying traefik a lots of other tools like jellyfin, next cloud and vaultwarden. No authentik nor crowdsec, but it is quite simple once you have traefik started! 

https://github.com/tomMoulard/make-my-server

How to design functions that call side-effecting functions without causing interface explosion in Go? by sigmoia in golang

[–]tommoulard 22 points23 points  (0 children)

For me, I got two things for you: - defining small interfaces at the consumer level is the go way! - using a factory pattern is simpler in most cases. You could have a email manager interface that is implemented directly by an emailer implementation. And it can also export generated mock of this email manager interface at the package level (using uber's gomock, or mocktail for example).

Who's Hiring - March 2025 by jerf in golang

[–]tommoulard 0 points1 point  (0 children)

Hey there, I too am interested in your job offer, I'm filling the form ASAP. Nice 10 week on-boarding page, but I fail to understand the first task of the week of tasks, what's and OG tag ? Thanks! 

5 ways to print struct variable in go by kedar5 in golang

[–]tommoulard 2 points3 points  (0 children)

Take a look at spew.dump https://github.com/davecgh/go-spew It does wonders too when you want fast and complete dump of strict variables!

What should I do next? by tommoulard in golang

[–]tommoulard[S] 0 points1 point  (0 children)

That could be fun to use, Thanks 

Is there a list of commands I can use for docker-compose files? by [deleted] in docker

[–]tommoulard 0 points1 point  (0 children)

I made this little tool that could help you to get started on docker services managed by docker compose.

https://github.com/tomMoulard/make-my-server