[go-nuts] Is there a good approach to abstraction of DB access including transactions and forupdate?

2018-12-10 Thread bonpi bonpi
I would like to abstract DB access of certain server programs like GCP bookshelf sample. However, in this example transactions are not handled. https://github.com/GoogleCloudPlatform/golang-samples/tree/master/getting-started/bookshelf When dealing with transactions, adding APIs to the interface

[go-nuts] Why does the Response Writer of the http package declare Write rather than embedding io.Writer?

2018-04-12 Thread bonpi bonpi
I know that there are no functional differences in them by duck typing. But since the Response package already has dependency on the io package(for example,http.File), so it does not have to lose its dependency, and I do not think that "Write([]byte)(int,error)" of ResponseWriter has a broader