Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

codes in repo could be more readable #623

Closed
allencloud opened this issue Sep 25, 2017 · 0 comments · Fixed by #619
Closed

codes in repo could be more readable #623

allencloud opened this issue Sep 25, 2017 · 0 comments · Fixed by #619
Assignees

Comments

@allencloud
Copy link
Contributor

Hi, All,

I found that there are some codes in this repo which could be more readable. like

matched := pattern.MatchString(haystack)	
if matched {		
        return true		
}		
return false

it could be just return pattern.MatchString(haystack).

In addition we could use return fast to simplify codes and eliminate else block.

allencloud added a commit to allencloud/runtime that referenced this issue Sep 25, 2017
What I did: simplify some codes; and use return fast to eliminate some else block, since I think this will make codes ident less to be more readable.

Fixes clearcontainers#623

Signed-off-by: Allen Sun <shlallen1990@gmail.com>
mcastelino pushed a commit to mcastelino/runtime that referenced this issue Dec 6, 2018
network: Move OCI hooks and network namespace creation out of virtcontainers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant