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 (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ type DfstoreConfig struct {
|
|||
func NewDfstore() *DfstoreConfig {
|
||||
url := url.URL{
|
||||
Scheme: "http",
|
||||
Host: fmt.Sprintf("%s:%d", "127.0.0.1", DefaultObjectStorageStartPort),
|
||||
Host: net.JoinHostPort("127.0.0.1", fmt.Sprint(DefaultObjectStorageStartPort)),
|
||||
}
|
||||
|
||||
return &DfstoreConfig{
|
||||
|
|
|
|||
Loading…
Reference in New Issue