Not that I've seen, but I've love to see it. You could probably build it with something like text/template and write:
SELECT id, title, expiry_date FROM posts WHERE id = {{ id }} AND expiry_date > {{ date }} ORDER BY expiry_date
This would give you some flexibility--the template tags would be replaced by ? or $1 or :name depending on the database driver set on parse--and leans on the stdlib. This would tie in nicely with https://github.com/jmoiron/sqlx and its struct tag/marshaling behaviour.
Access could be handled by a map[string]string, with the key as the filename and the value as the SQL (as a first thought).
Forgive my ignorance as I'm not very familiar with golang, but what you're describing above looks (to me) like a parameterized query. Nothing real fancy about that. I'd assume that Go has support for parameterized queries already.
Access could be handled by a map[string]string, with the key as the filename and the value as the SQL (as a first thought).