[go-nuts] Re: Test a Golang API on the web

2019-05-30 Thread Leonel Quinteros
Amazon Web Services will give you the smallest instance of a virtual machine for free (at least for a year): https://aws.amazon.com/en/free On Google Cloud Platform you can also have several services for free (forever) including a VM instance and an AppEngine deploy: https://cloud.google.com/fre

[go-nuts] Re: How to create reusable HTML components using default html/template package

2019-05-17 Thread Leonel Quinteros
I've created some approach for what you need, but designed to "compile" these templates and reusable components into a static site. Feel free to check the code for ideas to implement your own solution, it shouldn't be hard to do so: https://github.com/leonelquinteros/thtml I guess the code you

Re: [go-nuts] Using archive ".a" at time of build

2019-05-14 Thread Leonel Quinteros
Maybe using Plugins? Read material: https://golang.org/pkg/plugin/ https://medium.com/learning-the-go-programming-language/writing-modular-go-programs-with-plugins-ec46381ee1a9 El lunes, 13 de mayo de 2019, 10:55:40 (UTC-3), raje@gmail.com escribió: > > Hi Ian, > > > Is there any other way

Re: [go-nuts] Re: Best way to handle database transactions? (commit, or rollback on error)

2018-12-04 Thread Leonel Quinteros
clear and straightforward when you read that code, the Rollbacks after the errors and the Commits at the end of each function are just there, explicitly telling you what's happening when some DB query fails. But again, it's a matter of opinion, design and personal preferences. I

[go-nuts] Re: Best way to handle database transactions? (commit, or rollback on error)

2018-12-03 Thread Leonel Quinteros
Hi Ben, I'm pretty sure that the *err* variable is getting shadowed on your Update construct. Instead of doing: if _, err := UpdateBar(tx); err != nil { return err } You should do something like: _, err = UpdateBar(tx) if err != nil { return err } Just like you do with the insert