Skip to content

Commit

Permalink
fix(): linting, newline
Browse files Browse the repository at this point in the history
Signed-off-by: gourishkb <[email protected]>
  • Loading branch information
gourishkb committed Aug 27, 2024
1 parent c6f971a commit d2b196a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion provider/ns1/ns1.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ func (p *NS1Provider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

for _, record := range zoneData.Records {
if provider.SupportedRecordType(record.Type) {

// Fetch the complete record object from NS1
// This is required to get weight and note metadata
r, _, err := p.client.GetRecord(zone.Zone, record.Domain, record.Type)
Expand Down
6 changes: 0 additions & 6 deletions provider/stackpath/stackpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func (p *StackPathProvider) getZoneRecords(zoneID string) (dns.ZoneGetZoneRecord
}

func (p *StackPathProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error {

infoString := "Creating " + fmt.Sprint(len(changes.Create)) + " Record(s), Updating " + fmt.Sprint(len(changes.UpdateNew)) + " Record(s), Deleting " + fmt.Sprint(len(changes.Delete)) + " Record(s)"

//log.Infof(fmt.Sprint(changes))
Expand Down Expand Up @@ -247,7 +246,6 @@ func (p *StackPathProvider) ApplyChanges(ctx context.Context, changes *plan.Chan
}

func (p *StackPathProvider) create(endpoints []*endpoint.Endpoint, zones *[]dns.ZoneZone, zoneIDNameMap *provider.ZoneIDName) error {

for _, endpoint := range endpoints {
for _, zone := range *zones {
endpoint.DNSName = strings.Replace(endpoint.DNSName, "-"+zone.GetDomain(), "-at."+zone.GetDomain(), -1)
Expand Down Expand Up @@ -276,7 +274,6 @@ func (p *StackPathProvider) create(endpoints []*endpoint.Endpoint, zones *[]dns.
}

func (p *StackPathProvider) createTarget(zoneID string, domain string, ep *endpoint.Endpoint, target string) error {

if val, ok := ep.GetProviderSpecificProperty("weight"); ok {
if val, err := strconv.Atoi(val.Value); err == nil {
if val < 1 {
Expand Down Expand Up @@ -408,7 +405,6 @@ func (p *StackPathProvider) deleteCall(zoneID string, recordID string) (*http.Re
}

func (p *StackPathProvider) update(old []*endpoint.Endpoint, new []*endpoint.Endpoint, zones *[]dns.ZoneZone, zoneIDNameMap *provider.ZoneIDName, records *[]dns.ZoneZoneRecord) error {

err := p.create(new, zones, zoneIDNameMap)
if err != nil {
return err
Expand All @@ -423,7 +419,6 @@ func (p *StackPathProvider) update(old []*endpoint.Endpoint, new []*endpoint.End
}

func (p *StackPathProvider) zones() ([]dns.ZoneZone, error) {

zoneResponse, _, err := p.getZones()
if err != nil {
return nil, err
Expand Down Expand Up @@ -509,7 +504,6 @@ func endpointsByZoneID(zoneNameIDMapper provider.ZoneIDName, endpoints []*endpoi
}

func recordFromTarget(endpoint *endpoint.Endpoint, target string, records *[]dns.ZoneZoneRecord, domain string, ownerID string) (string, error) {

name := endpoint.DNSName

if name == domain {
Expand Down

0 comments on commit d2b196a

Please sign in to comment.