From 1eb57044ad5016e17ef121e98e1b6ac2983e9b54 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sat, 7 Dec 2024 02:28:16 +0100 Subject: [PATCH] refactor: clean up code --- main.go | 2 +- pkg/restore.go | 1 - utils/utils.go | 4 ---- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/main.go b/main.go index c00a9d1..0707588 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,3 @@ -// Package main / /* MIT License @@ -22,6 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + package main import "github.com/jkaninda/pg-bkup/cmd" diff --git a/pkg/restore.go b/pkg/restore.go index c64cd82..d1df2f2 100644 --- a/pkg/restore.go +++ b/pkg/restore.go @@ -1,4 +1,3 @@ -// Package internal / /* MIT License diff --git a/utils/utils.go b/utils/utils.go index 9a7da39..3a138a9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -254,7 +254,3 @@ func CronNextTime(cronExpr string) time.Time { next := schedule.Next(now) return next } -func UsageErrorf(cmd *cobra.Command, message string, args ...interface{}) error { - msg := fmt.Sprintf(message, args...) - return fmt.Errorf("%s\nSee '%s -h' for help and examples", msg, cmd.CommandPath()) -}