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

idea: test helper for localhost #19

Closed
shoenig opened this issue Jul 17, 2022 · 1 comment
Closed

idea: test helper for localhost #19

shoenig opened this issue Jul 17, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@shoenig
Copy link
Owner

shoenig commented Jul 17, 2022

Sometimes we write code that encapsulates resolving localhost and the output of that code contains the resolved localhost address - which tends to vary depending on if/how IPv6 is configured. One environment may produce 127.0.0.1 while another [::1].

A helper like Localhost(t *testing.T, s string) would be the most basic form, but there also tends to be cases where we want to include a port, and some cases with a protocol.

@shoenig
Copy link
Owner Author

shoenig commented Mar 9, 2024

Thinking these cases should just be handled properly in code.

@shoenig shoenig closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant