Skip to content

Commit

Permalink
PMM-11341 Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriCtvrtka committed Oct 26, 2023
1 parent bf1dff8 commit c010c78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion agent/serviceinfobroker/service_info_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ func (sib *ServiceInfoBroker) getPostgreSQLInfo(ctx context.Context, dsn string,
res.Version = version

var databaseCount int32
if err = db.QueryRowContext(ctx, "SELECT /* agent='serviceinfobroker' */ count(datname) FROM pg_database WHERE datallowconn = true AND datistemplate = false AND datname != current_database()").Scan(&databaseCount); err != nil {
databaseCountQuery := "SELECT /* agent='serviceinfobroker' */ count(datname) FROM pg_database WHERE datallowconn = true AND datistemplate = false AND datname != current_database()" //nolint:lll
if err = db.QueryRowContext(ctx, databaseCountQuery).Scan(&databaseCount); err != nil {
res.Error = err.Error()
}
res.DatabaseCount = databaseCount
Expand Down
2 changes: 1 addition & 1 deletion managed/models/agent_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type PostgreSQLExtendedOptionsParams interface {

// PostgreSQLOptionsFromRequest creates PostgreSQLOptions object from request.
func PostgreSQLOptionsFromRequest(params PostgreSQLOptionsParams) *PostgreSQLOptions {
res := new(PostgreSQLOptions)
res := &PostgreSQLOptions{}
if params.GetTlsCa() != "" || params.GetTlsCert() != "" || params.GetTlsKey() != "" {
res.SSLCa = params.GetTlsCa()
res.SSLCert = params.GetTlsCert()
Expand Down

0 comments on commit c010c78

Please sign in to comment.