I'm trying to solve a dependency problem : let's say I want to keep the code in my main.go totally decoupled from my database, I created 2 packages for that : dummy & postgres.
/app/
-- main.go
/dummy/
-- dummy.go
/postgres/
-- postgres.go
Everything is working fine, I just have to select in my main.go which package I would like to import to get a behavior or another... but is there a way to choose that when building main.go ?
If there's a more idiomatic way to achieve this, I'm of course very interested !