mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
add support for a host in ensurePortFormat (#1342)
* add support for an host in ensurePortFormat using a host enables the ability to bind to a specific interface * add support for an host in ensurePortFormat using a host enables the ability to bind to a specific interface
This commit is contained in:
@@ -143,6 +143,12 @@ func TestEnsurePortFormat(t *testing.T) {
|
||||
if given != expected {
|
||||
t.Fatalf("expected ensurePortFormat to not add a colon when it's present but got %v", given)
|
||||
}
|
||||
port = "127.0.0.1:3000"
|
||||
expected = "127.0.0.1:3000"
|
||||
given = ensurePortFormat(port)
|
||||
if given != expected {
|
||||
t.Fatalf("expected ensurePortFormat to not add a colon when it's present but got %v", given)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStorageEnvOverrides(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user