mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 07:43:17 +00:00
core: addresses.go funcs renames (#6622)
* right side in tls ln * remove ParseNetworkAddressFromHostPort * ignore placeholder port * remove println * update test cases (!!!) * [] * comment * Trim * Update addresses.go
This commit is contained in:
parent
1391e8ed9a
commit
0182fb87fa
3 changed files with 31 additions and 41 deletions
|
@ -31,7 +31,7 @@ func TestSplitNetworkAddress(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
input: "",
|
||||
expectErr: true,
|
||||
expectHost: "",
|
||||
},
|
||||
{
|
||||
input: "foo",
|
||||
|
@ -42,7 +42,7 @@ func TestSplitNetworkAddress(t *testing.T) {
|
|||
},
|
||||
{
|
||||
input: "::",
|
||||
expectErr: true,
|
||||
expectHost: "::",
|
||||
},
|
||||
{
|
||||
input: "[::]",
|
||||
|
@ -77,7 +77,7 @@ func TestSplitNetworkAddress(t *testing.T) {
|
|||
{
|
||||
input: "udp/",
|
||||
expectNetwork: "udp",
|
||||
expectErr: true,
|
||||
expectHost: "",
|
||||
},
|
||||
{
|
||||
input: "unix//foo/bar",
|
||||
|
@ -185,7 +185,8 @@ func TestParseNetworkAddress(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
input: "",
|
||||
expectErr: true,
|
||||
expectAddr: NetworkAddress{
|
||||
},
|
||||
},
|
||||
{
|
||||
input: ":",
|
||||
|
@ -311,7 +312,8 @@ func TestParseNetworkAddressWithDefaults(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
input: "",
|
||||
expectErr: true,
|
||||
expectAddr: NetworkAddress{
|
||||
},
|
||||
},
|
||||
{
|
||||
input: ":",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue