Skip to content

Commit

Permalink
Go-style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
noname0443 committed Sep 14, 2023
1 parent 7d1c00b commit 827b4f4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
mysql_driver "github.com/go-sql-driver/mysql"
"github.com/gofrs/flock"

"github.com/yandex/mysync/internal/app/external_replication"
"github.com/yandex/mysync/internal/app/replication"
"github.com/yandex/mysync/internal/config"
"github.com/yandex/mysync/internal/dcs"
"github.com/yandex/mysync/internal/log"
Expand All @@ -38,7 +38,7 @@ type App struct {
daemonState *DaemonState
daemonMutex sync.Mutex
replRepairState map[string]*ReplicationRepairState
ExternalReplication external_replication.IExternalReplication
ExternalReplication replication.IExternalReplication
}

// NewApp returns new App. Suddenly.
Expand All @@ -59,7 +59,7 @@ func NewApp(configFile, logLevel string, interactive bool) (*App, error) {
if logPath != "" {
logger.ReOpenOnSignal(syscall.SIGUSR2)
}
external_replication, err := external_replication.NewExternalReplication(config.IsExternalReplicationSupported, logger)
externalReplication, err := replication.NewExternalReplication(config.IsExternalReplicationSupported, logger)
if err != nil {
return nil, err
}
Expand All @@ -70,7 +70,7 @@ func NewApp(configFile, logLevel string, interactive bool) (*App, error) {
nodeFailedAt: make(map[string]time.Time),
streamFromFailedAt: make(map[string]time.Time),
replRepairState: make(map[string]*ReplicationRepairState),
ExternalReplication: external_replication,
ExternalReplication: externalReplication,
}
return app, nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package external_replication
package replication

import (
"database/sql"
Expand Down Expand Up @@ -95,7 +95,7 @@ func (er *ExternalReplication) IsSupported(n *mysql.Node) (bool, error) {
}

func (er *ExternalReplication) Set(n *mysql.Node) error {
var replSettings mysql.MySQLReplicationSettings
var replSettings mysql.MyReplicationSettings
err := n.QueryRow(mysql.QueryGetExternalReplicationSettings, nil, &replSettings)
if err != nil {
// If no table in scheme then we consider external replication not existing so we do nothing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package external_replication
package replication

import "github.com/yandex/mysync/internal/mysql"

Expand Down
2 changes: 1 addition & 1 deletion internal/mysql/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type ResetupStatus struct {
UpdateTime time.Time
}

type MySQLReplicationSettings struct {
type MyReplicationSettings struct {
ChannelName string `db:"ChannelName"`
SourceHost string `db:"SourceHost"`
SourceUser string `db:"SourceUser"`
Expand Down
2 changes: 1 addition & 1 deletion internal/mysql/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ func (n *Node) GetReplicaStatus() (ReplicaStatus, error) {
}

func (n *Node) UpdateExternalCAFile() error {
var replSettings MySQLReplicationSettings
var replSettings MyReplicationSettings
err := n.QueryRow(QueryGetExternalReplicationSettings, nil, &replSettings)
if err != nil {
return nil
Expand Down

0 comments on commit 827b4f4

Please sign in to comment.