Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/modern/root/config/connection-strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ func (c *ConnectionStrings) run() {

// connectionStringFormats borrowed from "portal.azure.com" "connection strings" pane
var connectionStringFormats = map[string]string{
"ADO.NET": "Server=tcp:%s,%d;Initial Catalog=%s;Persist Security Info=False;User ID=%s;Password=%s;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=%s;Connection Timeout=30;",
"JDBC": "jdbc:sqlserver://%s:%d;database=%s;user=%s;password=%s;encrypt=true;trustServerCertificate=%s;loginTimeout=30;",
"ODBC": "Driver={ODBC Driver 18 for SQL Server};Server=tcp:%s,%d;Database=%s;Uid=%s;Pwd=%s;Encrypt=yes;TrustServerCertificate=%s;Connection Timeout=30;",
"ADO.NET": "Server=tcp:%s,%#v;Initial Catalog=%s;Persist Security Info=False;User ID=%s;Password=%s;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=%s;Connection Timeout=30;",
"JDBC": "jdbc:sqlserver://%s:%#v;database=%s;user=%s;password=%s;encrypt=true;trustServerCertificate=%s;loginTimeout=30;",
"ODBC": "Driver={ODBC Driver 18 for SQL Server};Server=tcp:%s,%#v;Database=%s;Uid=%s;Pwd=%s;Encrypt=yes;TrustServerCertificate=%s;Connection Timeout=30;",
"GO": "sqlserver://%s:%s@%s,%d?database=%s;encrypt=true;trustServerCertificate=%s;dial+timeout=30",
"SQLCMD": "sqlcmd -S %s,%d -U %s",
"SQLCMD": "sqlcmd -S %s,%#v -U %s",
}

endpoint, user := config.CurrentContext()
Expand Down
2 changes: 1 addition & 1 deletion cmd/modern/root/install/mssql-base.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (c *MssqlBase) createContainer(imageName string, contextName string) {
hints = append(hints, []string{localizer.Sprintf("Remove"), "sqlcmd delete"})

output.InfoWithHintExamples(hints,
localizer.Sprintf("Now ready for client connections on port %d",
localizer.Sprintf("Now ready for client connections on port %#v",
c.port),
)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/modern/root/open/ads.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (c *Ads) launchAds(host string, port int, username string) {
"-r",
fmt.Sprintf(
"--server=%s", fmt.Sprintf(
"%s,%d",
"%s,%#v",
host,
port)),
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/modern/root/open/ads_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (c *Ads) persistCredentialForAds(
) {
// Create the target name that ADS will look for
targetName := c.adsKey(
fmt.Sprintf("%s,%d", hostname, rune(endpoint.Port)),
fmt.Sprintf("%s,%#v", hostname, rune(endpoint.Port)),
"", // The default database is set on the user login
"SqlLogin",
user.BasicAuth.Username)
Expand Down
8 changes: 4 additions & 4 deletions internal/net/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func IsLocalPortAvailable(port int) (portAvailable bool) {

hostPort := net.JoinHostPort("localhost", strconv.Itoa(port))
trace(
"Checking if local port %d is available using DialTimeout(tcp, %v, timeout: %d)",
"Checking if local port %#v is available using DialTimeout(tcp, %v, timeout: %d)",
port,
hostPort,
timeout,
Expand All @@ -28,7 +28,7 @@ func IsLocalPortAvailable(port int) (portAvailable bool) {
)
if err != nil {
trace(
"Expected connecting error '%v' on local port %d, therefore port is available)",
"Expected connecting error '%v' on local port %#v, therefore port is available)",
err,
port,
)
Expand All @@ -37,9 +37,9 @@ func IsLocalPortAvailable(port int) (portAvailable bool) {
if conn != nil {
err := conn.Close()
checkErr(err)
trace("Local port '%d' is not available", port)
trace("Local port '%#v' is not available", port)
} else {
trace("Local port '%d' is available", port)
trace("Local port '%#v' is available", port)
}

return
Expand Down
4 changes: 2 additions & 2 deletions internal/net/net_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ func TestIsLocalPortAvailable(t *testing.T) {
isPortAvailable := IsLocalPortAvailable(i)
if isPortAvailable {
testedPortAvailable = true
t.Logf("Port %d is available", i)
t.Logf("Port %#v is available", i)
} else {
testedNotPortAvailable = true
t.Logf("Port %d is not available", i)
t.Logf("Port %#v is not available", i)
}
if testedPortAvailable && testedNotPortAvailable {
return
Expand Down
2 changes: 1 addition & 1 deletion internal/sql/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (m *mssql) Connect(
m.sqlcmd.Format = sqlcmd.NewSQLCmdDefaultFormatter(false, sqlcmd.ControlIgnore)
connect := sqlcmd.ConnectSettings{
ServerName: fmt.Sprintf(
"%s,%d",
"%s,%#v",
endpoint.EndpointDetails.Address,
endpoint.EndpointDetails.Port),
ApplicationName: "sqlcmd",
Expand Down
1,344 changes: 672 additions & 672 deletions internal/translations/catalog.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/translations/locales/de-DE/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/en-US/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/es-ES/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/fr-FR/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/it-IT/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/ja-JP/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/ko-KR/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/pt-BR/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/ru-RU/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/zh-CN/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/translations/locales/zh-TW/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@
"placeholders": [
{
"id": "Port",
"string": "%[1]d",
"string": "%#[1]v",
"type": "int",
"underlyingType": "int",
"argNum": 1,
Expand Down