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

Change functions/variables to make them aligned with context #79

Open
DmytroLinkin opened this issue Jul 28, 2020 · 5 comments
Open

Change functions/variables to make them aligned with context #79

DmytroLinkin opened this issue Jul 28, 2020 · 5 comments
Labels
refactoring Code refactoring

Comments

@DmytroLinkin
Copy link
Contributor

Some functions/variables names can confuse what they really do. For ex., in pkg/utils/utils.go:

 35 // HasNetworkAttachment check if pod has Network Attachment
 36 func HasNetworkAttachment(pod *kapi.Pod) bool {
 37         return len(pod.Annotations[v1.NetworkAttachmentAnnot]) > 0
 38 }

function actually check network attachment annotations, not network attachment.

@DmytroLinkin
Copy link
Contributor Author

@adrianchiris

@adrianchiris
Copy link
Collaborator

a pod is associated with a network attachment if it has a network attachment annotation.
so im not sure there is an issue here.

can you elaborate on why you think there is an issue ?

@DmytroLinkin
Copy link
Contributor Author

Originally, You complained that name of this function a bit confusing.

@adrianchiris
Copy link
Collaborator

yea well, i dont remember what was confusing :)

@adrianchiris adrianchiris added the refactoring Code refactoring label Aug 20, 2020
@adrianchiris
Copy link
Collaborator

So this should be renamed to: HasNetworkAttachmentAnnot()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
Development

No branches or pull requests

2 participants