Skip to content

Commit

Permalink
chore: minor stuff
Browse files Browse the repository at this point in the history
Signed-off-by: Armando Ruocco <[email protected]>
  • Loading branch information
armru committed Feb 12, 2024
1 parent 7d03170 commit af08c05
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions internal/backup/controldata.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/cloudnative-pg/cloudnative-pg/pkg/management/url"
"github.com/cloudnative-pg/cloudnative-pg/pkg/utils"

"github.com/cloudnative-pg/plugin-pvc-backup/pkg/logging"
)

Expand Down
1 change: 0 additions & 1 deletion internal/backup/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func (executor *Executor) Start(ctx context.Context) error {

return nil
})

if err != nil {
return err
}
Expand Down
12 changes: 6 additions & 6 deletions internal/backup/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ func getWalPrefix(walName string) string {
return walName[0:16]
}

// GetClusterPath gets the path where the files relative
// getClusterPath gets the path where the files relative
// to a cluster are stored
func GetClusterPath(clusterName string) string {
func getClusterPath(clusterName string) string {
return path.Join(basePath, clusterName)
}

// GetWALPath gets the path where the WALs relative
// to a cluster are stored
func GetWALPath(clusterName string) string {
return path.Join(
GetClusterPath(clusterName),
getClusterPath(clusterName),
walsDirectory,
)
}
Expand All @@ -31,7 +31,7 @@ func GetWALPath(clusterName string) string {
// kopia configuration file will be written
func GetKopiaConfigFilePath(clusterName string) string {
return path.Join(
GetClusterPath(clusterName),
getClusterPath(clusterName),
".kopia.config",
)
}
Expand All @@ -40,7 +40,7 @@ func GetKopiaConfigFilePath(clusterName string) string {
// kopia cache will be written
func GetKopiaCacheDirectory(clusterName string) string {
return path.Join(
GetClusterPath(clusterName),
getClusterPath(clusterName),
".kopia.cache",
)
}
Expand All @@ -49,7 +49,7 @@ func GetKopiaCacheDirectory(clusterName string) string {
// to a cluster are stored
func GetBasePath(clusterName string) string {
return path.Join(
GetClusterPath(clusterName),
getClusterPath(clusterName),
baseDirectory,
)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/pluginhelper/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type ServerEnricher func(*grpc.Server)
func CreateMainCmd(identityImpl identity.IdentityServer, enrichers ...ServerEnricher) *cobra.Command {
cmd := &cobra.Command{
Use: "pvc-backup",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
PersistentPreRun: func(cmd *cobra.Command, _ []string) {
ctx := logging.IntoContext(
cmd.Context(),
viper.GetBool("debug"))
Expand Down

0 comments on commit af08c05

Please sign in to comment.