@@ -36,7 +36,6 @@ func getRecordFromTypeAndData(dnsType domain.RecordType, data string, records []
3636 flattenCurrentData := flattenDomainData (strings .ToLower (data ), r .Type ).(string )
3737
3838 if strings .HasPrefix (flattedData , flattenCurrentData ) && r .Type == dnsType {
39-
4039 if currentRecord != nil {
4140 return nil , errors .New ("multiple records found with same type and data" )
4241 }
@@ -164,6 +163,7 @@ func expandContactExtension(extensionMap map[string]interface{}, extensionType s
164163 case "nl" :
165164 legalFormRegistrationNumber := ""
166165 if value , ok := extensionMap ["legal_form_registration_number" ]; ok {
166+
167167 if str , isString := value .(string ); isString {
168168 legalFormRegistrationNumber = str
169169 }
@@ -176,6 +176,7 @@ func expandContactExtension(extensionMap map[string]interface{}, extensionType s
176176
177177 case "eu" :
178178 europeanCitizenship := ""
179+
179180 if value , ok := extensionMap ["european_citizenship" ]; ok {
180181 if str , isString := value .(string ); isString {
181182 europeanCitizenship = str
@@ -303,16 +304,19 @@ func mapToStruct(data map[string]interface{}, target interface{}) {
303304 if v , ok := data ["duns_id" ].(string ); ok {
304305 t .DunsID = v
305306 }
307+
306308 if v , ok := data ["local_id" ].(string ); ok {
307309 t .LocalID = v
308310 }
309311
310312 case * domain.ContactExtensionFRAssociationInfo :
311313 if v , ok := data ["publication_jo" ].(string ); ok {
314+
312315 if parsedTime , err := time .Parse (time .RFC3339 , v ); err == nil {
313316 t .PublicationJo = & parsedTime
314317 }
315318 }
319+
316320 if v , ok := data ["publication_jo_page" ].(float64 ); ok {
317321 t .PublicationJoPage = uint32 (v )
318322 }
@@ -331,13 +335,15 @@ func mapToStruct(data map[string]interface{}, target interface{}) {
331335
332336func getStatusTasks (ctx context.Context , api * domain.RegistrarAPI , taskID string ) (domain.TaskStatus , error ) {
333337 var page int32 = 1
338+
334339 var pageSize uint32 = 1000
335340
336341 for {
337342 listTasksResponse , err := api .ListTasks (& domain.RegistrarAPIListTasksRequest {
338343 Page : & page ,
339344 PageSize : & pageSize ,
340345 }, scw .WithContext (ctx ))
346+
341347 if err != nil {
342348 return "" , fmt .Errorf ("error retrieving tasks: %w" , err )
343349 }
0 commit comments