diff pkg/imports/misc.go @ 4178:51e90370eced

A few more doc strings to make 'golint' a little bit more happy with the imports package.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 05 Aug 2019 17:45:03 +0200
parents f464cbcdf2f2
children 1d50ac8dd688
line wrap: on
line diff
--- a/pkg/imports/misc.go	Mon Aug 05 17:16:46 2019 +0200
+++ b/pkg/imports/misc.go	Mon Aug 05 17:45:03 2019 +0200
@@ -30,6 +30,12 @@
 	return b.String()
 }
 
+// Savepoint is a function wrapper to hide the details
+// of managing database SAVEPOINTs.
+// If the returned function is called with a callback
+// the callback is run in a SAVEPOINT.
+// If the callback returns w/o an error the SAVEPOINT
+// is released. Otherwise the SAVEPOINT is rolled back.
 func Savepoint(
 	ctx context.Context,
 	tx *sql.Tx,