Skip to content

Commit

Permalink
#133 Better error formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Nov 7, 2024
1 parent f080b52 commit 9c10321
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ func BuildSimpleSettingsUsingMap(attributeMap map[string]string) (string, error)

// Transform structure to JSON.

buffer := &bytes.Buffer{}
jsonEncoder := json.NewEncoder(buffer)
resultBuffer := &bytes.Buffer{}
jsonEncoder := json.NewEncoder(resultBuffer)
jsonEncoder.SetEscapeHTML(false)
err = jsonEncoder.Encode(resultStruct)
if err != nil {
return "", err
}

return buffer.String(), err
return resultBuffer.String(), err
}

/*
Expand Down Expand Up @@ -252,7 +252,7 @@ func buildSpecificDatabaseURL(databaseURL string) (string, error) {
string(parsedURL.Path[1:]),
)
if len(parsedURL.RawQuery) > 0 {
result = fmt.Sprintf("%s?%s", result, parsedURL.RawQuery)
result = fmt.Sprintf("%s?%s", result, parsedURL.Query().Encode())
}
case "mssql":
result = fmt.Sprintf(
Expand Down

0 comments on commit 9c10321

Please sign in to comment.