VOL-1900 lint warning fixes db
Change-Id: Iaa4e5c271c9e1d7c8ebce1e13c7e723ea4762304
diff --git a/db/model/transaction.go b/db/model/transaction.go
index e10236c..f54b0d2 100644
--- a/db/model/transaction.go
+++ b/db/model/transaction.go
@@ -13,19 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package model
import (
"context"
"fmt"
+
"github.com/opencord/voltha-lib-go/v2/pkg/log"
)
+// Transaction -
type Transaction struct {
proxy *Proxy
txid string
}
+// NewTransaction -
func NewTransaction(proxy *Proxy, txid string) *Transaction {
tx := &Transaction{
proxy: proxy,
@@ -62,10 +66,14 @@
}
return t.proxy.Remove(ctx, path, t.txid)
}
+
+// Cancel -
func (t *Transaction) Cancel() {
t.proxy.cancelTransaction(t.txid)
t.txid = ""
}
+
+// Commit -
func (t *Transaction) Commit() {
t.proxy.commitTransaction(t.txid)
t.txid = ""