Beware of ent (entgo.io)

If you’re using Go, you’ve likely heard of ent. Some Ex-Facebook employee maintaining and developing an open source version of the public version of Meta’s entity framework for Go. Well there’s a catch. Migrations. They sweet talk you in their documentation to use Atlas. Ariga’s Atlas, not the MongoDB one. But Atlas is a proprietary […]

Golang get openid-connect userinfo

It might not be news to you, but this will explain a little bit about Go, making http requests and parsing the result. OpenID-Connect (oidc) is an identity protocol, you could call it an Oauth2 dialect. It manages your users per realm, well not the protocol but the server does. Every oidc idp (identity provider […]

Using gin with pongo2/v4 or v5 and embedded templates

You’d like to use pongo2/v4 with gin and embed templates with go:embed. I’m using cobra for my cli parsing and commands. So

edit cmd/ui.go

ui/templates.go

ui/templates/base.html.twig

ui/templates/layout.html.twig

ui/templates/index.html.twig

and finally run

to download packages Any questions -> leave a comment

Go/Golang Run embedded bash script or node/js,python,php,ruby etc

Since Go v1.16 there’s the embed package, a simple tool to embed files as filesystems of simple strings or []bytes. While it has its downsides, I was recently met with a challenge. I’d like to run bash scripts I wrote because it’s more efficient to just run a bash script than breaking my fingers writing […]