Hacker News new | ask | show | jobs
by aw4y 1676 days ago
the reason I went "quick'n dirty" is for the prototyping nature of the project. But I'll fix this anyway, thanks!
2 comments

Using the db Exec / Query / Query row is the same amount of code and effort the fmt.Sprintf statements. Even in quick-and-dirty mock-ups, it's a good idea to not cut corners there.
There's nothing as permanent as a temporary solution. There's been countless SQL injection vulnerabilities exploited over the past decades with the "I'll fix it later" mindset.

Start with prepared statements by default, they are not more work than formatting strings.