feat: net.JoinHostPort replace fmt.Sprintf (#2622)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
a5b0f7404d
commit
9e1bb52f2b
|
|
@ -19,6 +19,7 @@ package config
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net"
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -44,7 +45,7 @@ type DfstoreConfig struct {
|
||||||
func NewDfstore() *DfstoreConfig {
|
func NewDfstore() *DfstoreConfig {
|
||||||
url := url.URL{
|
url := url.URL{
|
||||||
Scheme: "http",
|
Scheme: "http",
|
||||||
Host: fmt.Sprintf("%s:%d", "127.0.0.1", DefaultObjectStorageStartPort),
|
Host: net.JoinHostPort("127.0.0.1", fmt.Sprint(DefaultObjectStorageStartPort)),
|
||||||
}
|
}
|
||||||
|
|
||||||
return &DfstoreConfig{
|
return &DfstoreConfig{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue