From 2be58743326d5176b05845757c2bc0464beddfc4 Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Sat, 6 Apr 2024 22:09:17 +0700 Subject: [PATCH] refactor: moved packages to pkg --- {caller => pkg/caller}/caller.go | 0 {errs => pkg/errs}/errs.go | 4 ++-- {errs => pkg/errs}/query.go | 0 {log => pkg/log}/context.go | 0 {log => pkg/log}/log.go | 2 +- {log => pkg/log}/nil_handler.go | 0 {log => pkg/log}/pretty_handler.go | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) rename {caller => pkg/caller}/caller.go (100%) rename {errs => pkg/errs}/errs.go (97%) rename {errs => pkg/errs}/query.go (100%) rename {log => pkg/log}/context.go (100%) rename {log => pkg/log}/log.go (98%) rename {log => pkg/log}/nil_handler.go (100%) rename {log => pkg/log}/pretty_handler.go (98%) diff --git a/caller/caller.go b/pkg/caller/caller.go similarity index 100% rename from caller/caller.go rename to pkg/caller/caller.go diff --git a/errs/errs.go b/pkg/errs/errs.go similarity index 97% rename from errs/errs.go rename to pkg/errs/errs.go index b80c66c..f7787de 100644 --- a/errs/errs.go +++ b/pkg/errs/errs.go @@ -8,8 +8,8 @@ import ( "reflect" "strings" - "github.com/tigorlazuardi/redmage/caller" - "github.com/tigorlazuardi/redmage/log" + "github.com/tigorlazuardi/redmage/pkg/caller" + "github.com/tigorlazuardi/redmage/pkg/log" ) type Error interface { diff --git a/errs/query.go b/pkg/errs/query.go similarity index 100% rename from errs/query.go rename to pkg/errs/query.go diff --git a/log/context.go b/pkg/log/context.go similarity index 100% rename from log/context.go rename to pkg/log/context.go diff --git a/log/log.go b/pkg/log/log.go similarity index 98% rename from log/log.go rename to pkg/log/log.go index 0112602..0aa762d 100644 --- a/log/log.go +++ b/pkg/log/log.go @@ -12,8 +12,8 @@ import ( "github.com/go-chi/chi/v5/middleware" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" - "github.com/tigorlazuardi/redmage/caller" "github.com/tigorlazuardi/redmage/config" + "github.com/tigorlazuardi/redmage/pkg/caller" ) var handler slog.Handler = NullHandler{} diff --git a/log/nil_handler.go b/pkg/log/nil_handler.go similarity index 100% rename from log/nil_handler.go rename to pkg/log/nil_handler.go diff --git a/log/pretty_handler.go b/pkg/log/pretty_handler.go similarity index 98% rename from log/pretty_handler.go rename to pkg/log/pretty_handler.go index 59cb040..8efe655 100644 --- a/log/pretty_handler.go +++ b/pkg/log/pretty_handler.go @@ -11,7 +11,7 @@ import ( "sync" "github.com/fatih/color" - "github.com/tigorlazuardi/redmage/caller" + "github.com/tigorlazuardi/redmage/pkg/caller" ) type PrettyHandler struct {