Skip to content

Commit 7d88600

Browse files
author
Andrew Farries
committed
Use net.JoinHostPort instead of Sprintf
1 parent c831a80 commit 7d88600

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install/installer/pkg/components/usage/configmap.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ package usage
55

66
import (
77
"fmt"
8+
"net"
9+
"strconv"
810
"time"
911

1012
"github.com/gitpod-io/gitpod/common-go/baseserver"
@@ -21,7 +23,7 @@ import (
2123
func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
2224
cfg := server.Config{
2325
ControllerSchedule: time.Hour.String(),
24-
ContentServiceAddress: fmt.Sprintf("%s:%d", content_service.Component, content_service.RPCPort),
26+
ContentServiceAddress: net.JoinHostPort(content_service.Component, strconv.Itoa(content_service.RPCPort)),
2527
Server: &baseserver.Configuration{
2628
Services: baseserver.ServicesConfiguration{
2729
GRPC: &baseserver.ServerConfiguration{

0 commit comments

Comments
 (0)