Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

constification of constifiable vars #636

Closed
egernst opened this issue Feb 22, 2018 · 1 comment
Closed

constification of constifiable vars #636

egernst opened this issue Feb 22, 2018 · 1 comment

Comments

@egernst
Copy link
Collaborator

egernst commented Feb 22, 2018

Noticed that we pretty liberally use var ( ) for what could in many cases be treated as a const.
Example can be seen at https://github.com/containers/virtcontainers/blob/master/kata_agent.go#L38

Some of these are more explicitly marked as var since they are updated during unit tests (see *_test.go) to aid in testing. For the remainder it'd be a good idea to mark these as consts.

@egernst egernst changed the title constification of constifiable variables constification of constifiable vars Feb 22, 2018
@egernst egernst added next and removed backlog labels Mar 7, 2018
@egernst
Copy link
Collaborator Author

egernst commented Apr 2, 2018

This issue was moved to kata-containers/runtime#142

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant