Skip to content

Commit

Permalink
Go format code
Browse files Browse the repository at this point in the history
  • Loading branch information
mossroy committed Dec 12, 2023
1 parent b4a50e0 commit fe2f3f7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion checker/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (m *MySQL) Check(ctx context.Context) (err error) {
if checker.IsConnectionRefused(err) {
return checker.NewExpectedError(
"failed to establish a connection to the mysql server", err,
"dsn", removeUsernamePasswordRegex.ReplaceAllString(m.dsn,`***:***@`),
"dsn", removeUsernamePasswordRegex.ReplaceAllString(m.dsn, `***:***@`),
)
}

Expand Down
2 changes: 1 addition & 1 deletion checker/postgresql/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (p *PostgreSQL) Check(ctx context.Context) (err error) {
if checker.IsConnectionRefused(err) {
return checker.NewExpectedError(
"failed to establish a connection to the postgresql server", err,
"dsn", removeUsernamePasswordRegex.ReplaceAllString(p.dsn,`***:***@`),
"dsn", removeUsernamePasswordRegex.ReplaceAllString(p.dsn, `***:***@`),
)
}

Expand Down
4 changes: 2 additions & 2 deletions checker/rabbitmq/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"fmt"
"github.com/streadway/amqp"
"net"
"regexp"
"time"
"wait4x.dev/v2/checker"
"regexp"
)

var removeUsernamePasswordRegex = regexp.MustCompile(`[^/:@]+:[^/:@]+@`)
Expand Down Expand Up @@ -121,7 +121,7 @@ func (r *RabbitMQ) Check(ctx context.Context) (err error) {
if checker.IsConnectionRefused(err) {
return checker.NewExpectedError(
"failed to establish a connection to the rabbitmq server", err,
"dsn", removeUsernamePasswordRegex.ReplaceAllString(r.dsn,`***:***@`),
"dsn", removeUsernamePasswordRegex.ReplaceAllString(r.dsn, `***:***@`),
)
}

Expand Down
2 changes: 1 addition & 1 deletion checker/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (r *Redis) Check(ctx context.Context) error {
if checker.IsConnectionRefused(err) {
return checker.NewExpectedError(
"failed to establish a connection to the redis server", err,
"dsn", removeUsernamePasswordRegex.ReplaceAllString(r.address,`***:***@`),
"dsn", removeUsernamePasswordRegex.ReplaceAllString(r.address, `***:***@`),
)
}

Expand Down

0 comments on commit fe2f3f7

Please sign in to comment.