-
Notifications
You must be signed in to change notification settings - Fork 36
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
duplicate synclink code? #166
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Whilst looking at the
SyncLink
function, I noticed there may be some duplicated code:wireguard-operator/pkg/wireguard/wireguard.go
Lines 136 to 142 in 1d1bef4
It looks like we already get the link and set it to up later in the function.
wireguard-operator/pkg/wireguard/wireguard.go
Lines 145 to 150 in 1d1bef4
wireguard-operator/pkg/wireguard/wireguard.go
Lines 167 to 169 in 1d1bef4
I didn't remove it at the time because I don't know if this is deliberate, or if it can just be removed. I also wonder if the check for whether or not the link exists a second time makes sense? How could it possibly not exist if we just created it? I wonder if this function should be reworked a bit to simply call itself again after the link is created rather than getting the link multiple times.
To Reproduce
N/A
Expected behavior
N/A
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: