Skip to content

Commit bc405e4

Browse files
fix(config add-endpoint): don't apply locale thousands separator to port
localizer.Sprintf routes through golang.org/x/text/message, which formats %v on an int with the locale's number formatter (e.g. en-US prints 1433 as '1,433'). Pre-format the port as a string so the displayed hint reads "port: '1433'".
1 parent e600213 commit bc405e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/modern/root/config/add-endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ func (c *AddEndpoint) run() {
8181
{localizer.Sprintf("View all endpoints details"), "sqlcmd config get-endpoints --detailed"},
8282
{localizer.Sprintf("Delete this endpoint"), fmt.Sprintf("sqlcmd config delete-endpoint %v", uniqueEndpointName)},
8383
},
84-
localizer.Sprintf("Endpoint '%v' added (address: '%v', port: '%v')", uniqueEndpointName, c.address, c.port))
84+
localizer.Sprintf("Endpoint '%v' added (address: '%v', port: '%v')", uniqueEndpointName, c.address, fmt.Sprintf("%d", c.port)))
8585
}

0 commit comments

Comments
 (0)