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

Move hard coded strings to constants #59

Closed
jpkrohling opened this issue Oct 11, 2018 · 4 comments
Closed

Move hard coded strings to constants #59

jpkrohling opened this issue Oct 11, 2018 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@jpkrohling
Copy link
Contributor

jpkrohling commented Oct 11, 2018

There are quite a few hard coded strings in the code, like jaeger-agent as the container name for the Jaeger Agent sidecar container. They should all move to constants.

Where appropriate, types should be used to represent constant values.

@andream16
Copy link

Working on this!

@andream16
Copy link

@jpkrohling what about sharing constants in the same package? For instance, in pkg/deployment, strings like "jaeger-version" are used more than once in different files.

Would you agree on creating a new file called values.go in which you define package level shared constants?

Otherwise, how would you handle it?

@jpkrohling
Copy link
Contributor Author

Would you agree on creating a new file called values.go in which you define package level shared constants?

Yes, I think it's a good approach. Another option would be to have a dedicated package for constants, but I think I prefer to leave the constants closer to where they semantically belong to (jaeger-version belonging to the deployment package).

@andream16
Copy link

Perfect.

@jpkrohling jpkrohling added needs-triage New issues, in need of classification and removed needs-triage New issues, in need of classification labels Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants