mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-12 05:33:11 +01:00
chore: review and go.mod tidy
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
This commit is contained in:
parent
765868cb68
commit
c27dc1e3d4
2
go.sum
2
go.sum
@ -32,8 +32,6 @@ github.com/cloudnative-pg/cloudnative-pg v1.24.1-0.20241113134512-8608232c2813 h
|
||||
github.com/cloudnative-pg/cloudnative-pg v1.24.1-0.20241113134512-8608232c2813/go.mod h1:f4hObdRVoQtMmVtWqZ6VDZBrI6ok9Td/UMhojQ+EPmk=
|
||||
github.com/cloudnative-pg/cnpg-i v0.0.0-20241109002750-8abd359df734 h1:4jq/FUrlAKxu0Kw9PL5lj5Njq8pAnmUpP/kXKOrJAaE=
|
||||
github.com/cloudnative-pg/cnpg-i v0.0.0-20241109002750-8abd359df734/go.mod h1:3U7miYasKr2rYCQzrn/IvbSQc0OpYF8ieZt2FKG4nv0=
|
||||
github.com/cloudnative-pg/cnpg-i-machinery v0.0.0-20241129144432-bd94f16685d3 h1:hKTlmgyOq5ZS7t1eVa4SY1hH361gZ7VIb0an+BH9rJs=
|
||||
github.com/cloudnative-pg/cnpg-i-machinery v0.0.0-20241129144432-bd94f16685d3/go.mod h1:X6r1fRuUEIAv4+5SSBY2RmQ201K6GcptOXgnmaX/8tY=
|
||||
github.com/cloudnative-pg/cnpg-i-machinery v0.0.0-20241205093641-958e207b8afe h1:gUGqx4eTHreM0QWbszSx6wnbBw9Vavp5uYl4uA9fh1k=
|
||||
github.com/cloudnative-pg/cnpg-i-machinery v0.0.0-20241205093641-958e207b8afe/go.mod h1:X6r1fRuUEIAv4+5SSBY2RmQ201K6GcptOXgnmaX/8tY=
|
||||
github.com/cloudnative-pg/machinery v0.0.0-20241105070525-042a028b767c h1:t0RBU2gBiwJQ9XGeXlHPBYpsTscSKHgB5TfcWaiwanc=
|
||||
|
||||
@ -1,14 +1,16 @@
|
||||
package common
|
||||
|
||||
// WALNotFoundError is raised when a WAL file has not been found in the object store
|
||||
type WALNotFoundError struct{}
|
||||
// walNotFoundError is raised when a WAL file has not been found in the object store
|
||||
type walNotFoundError struct{}
|
||||
|
||||
func newWALNotFoundError() *walNotFoundError { return &walNotFoundError{} }
|
||||
|
||||
// ShouldPrintStackTrace tells whether the sidecar log stream should contain the stack trace
|
||||
func (e WALNotFoundError) ShouldPrintStackTrace() bool {
|
||||
func (e walNotFoundError) ShouldPrintStackTrace() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Error implements the error interface
|
||||
func (e WALNotFoundError) Error() string {
|
||||
func (e walNotFoundError) Error() string {
|
||||
return "WAL file not found"
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ func (w WALServiceImplementation) restoreFromBarmanObjectStore(
|
||||
// The failure has already been logged in walRestorer.RestoreList method
|
||||
if walStatus[0].Err != nil {
|
||||
if errors.Is(walStatus[0].Err, barmanRestorer.ErrWALNotFound) {
|
||||
return WALNotFoundError{}
|
||||
return newWALNotFoundError()
|
||||
}
|
||||
|
||||
return walStatus[0].Err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user