From 3f1abb30acee6c47758ccb47666f10ce530f4053 Mon Sep 17 00:00:00 2001 From: Sean Murphy Date: Mon, 20 May 2019 20:22:31 +0200 Subject: [PATCH] Modified PostRecords function to return number of records posted --- udr/udr.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/udr/udr.go b/udr/udr.go index a79460a..d514818 100644 --- a/udr/udr.go +++ b/udr/udr.go @@ -37,13 +37,15 @@ type UDRService struct { } // PostRecords takes a set of UDRRecords and posts them to the UDR endpoint -func (u *UDRService) PostRecords(records []UDRRecord) (success bool, err error) { +func (u *UDRService) PostRecords(records []UDRRecord) (success bool, recordsWritten int, err error) { success = true + recordsWritten = 0 for _, r := range records { success, err = u.PostRecord(r) if !success { return } + recordsWritten++ } return }