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

Optimizing looping over namespaces #1418

Merged
merged 1 commit into from
Apr 27, 2017

Conversation

harche
Copy link

@harche harche commented Apr 25, 2017

There is no need to loop twice just to skip the namespaces
that we don't need to join.

Signed-off-by: Harshal Patil harshal.patil@in.ibm.com

if c.config.Namespaces.Contains(ns) {
nsTypes = append(nsTypes, ns)

for _, ns := range order{
Copy link
Member

Choose a reason for hiding this comment

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

Please run gofmt on your code and amend your commit accordingly, thanks.

@harche
Copy link
Author

harche commented Apr 26, 2017

Updated my branch after running go fmt. Thanks.

@cyphar
Copy link
Member

cyphar commented Apr 26, 2017

From the CI:

$ make BUILDTAGS="${BUILDTAGS}" clean validate test
rm -f runc
rm -f contrib/cmd/recvtty/recvtty
rm -rf /home/travis/gopath/src/github.com/opencontainers/runc/release
rm -rf /home/travis/gopath/src/github.com/opencontainers/runc/man/man8
script/validate-gofmt
These files are not properly gofmt'd:
 - libcontainer/container_linux.go
Please reformat the above files using "gofmt -s -w" and commit the result.
make: *** [validate] Error 1

You need to use gofmt -s -w.

Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
@harche
Copy link
Author

harche commented Apr 26, 2017

Updated my branch after running gofmt -s -w . Thanks.

@cyphar
Copy link
Member

cyphar commented Apr 26, 2017

LGTM, thanks.

Approved with PullApprove

@mrunalp
Copy link
Contributor

mrunalp commented Apr 27, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit c845212 into opencontainers:master Apr 27, 2017
@harche harche deleted the optimized_loop branch July 23, 2017 14:49
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.

3 participants