Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge terraform provider tidydns #4

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Conversation

jenrik
Copy link
Contributor

@jenrik jenrik commented Nov 27, 2024

No description provided.

pkg/tidydns/tidydns.go Outdated Show resolved Hide resolved
@jenrik jenrik requested a review from hatrx November 27, 2024 14:36
Comment on lines +224 to +233
var interfaceRead interfaceRead
err = json.NewDecoder(res.Body).Decode(&interfaceRead)
if err != nil {
return nil, err
}

return &InterfaceInfo{
InterfaceIP: interfaceRead.Destination,
Interfacename: interfaceRead.Name,
}, nil
Copy link

@hatrx hatrx Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason for creating a whole new interfaceRead type when you are just copying the data to InterfaceInfo? Seems like you only need one or the other

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it might be superfluous, but I would prefer not breaking backward compatibility by changing the interface.
Also I think it might be wise to separate the internals from the interface we expose to the users of the go api.

@jenrik jenrik merged commit d80f420 into main Dec 2, 2024
1 check passed
@jenrik jenrik deleted the merge-terraform-provider-tidydns branch December 2, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants