From ec56b7995cbf17917bfc4dd65dd084a98478e913 Mon Sep 17 00:00:00 2001 From: gucio321 Date: Wed, 27 Nov 2024 17:52:37 +0100 Subject: [PATCH] move common/state to app/state --- pkg/app/app_state.go | 3 ++- pkg/{common => app}/state/app_state.go | 0 pkg/{common => app}/state/editor_state.go | 0 pkg/{common => app}/state/tool_window_state.go | 0 pkg/{common => app}/state/window_state.go | 0 pkg/config/config.go | 3 +-- pkg/window/editor/editor.go | 2 +- pkg/window/toolwindow/console/console.go | 2 +- pkg/window/toolwindow/mpqexplorer/mpqexplorer.go | 2 +- pkg/window/toolwindow/projectexplorer/projectexplorer.go | 2 +- pkg/window/toolwindow/toolwindow.go | 2 +- pkg/window/window.go | 3 +-- 12 files changed, 9 insertions(+), 10 deletions(-) rename pkg/{common => app}/state/app_state.go (100%) rename pkg/{common => app}/state/editor_state.go (100%) rename pkg/{common => app}/state/tool_window_state.go (100%) rename pkg/{common => app}/state/window_state.go (100%) diff --git a/pkg/app/app_state.go b/pkg/app/app_state.go index 8b54e44e..caf950a5 100644 --- a/pkg/app/app_state.go +++ b/pkg/app/app_state.go @@ -4,8 +4,9 @@ import ( "encoding/json" "log" + state "github.com/gucio321/HellSpawner/pkg/app/state" + "github.com/gucio321/HellSpawner/pkg/common" - "github.com/gucio321/HellSpawner/pkg/common/state" "github.com/gucio321/HellSpawner/pkg/window/toolwindow" ) diff --git a/pkg/common/state/app_state.go b/pkg/app/state/app_state.go similarity index 100% rename from pkg/common/state/app_state.go rename to pkg/app/state/app_state.go diff --git a/pkg/common/state/editor_state.go b/pkg/app/state/editor_state.go similarity index 100% rename from pkg/common/state/editor_state.go rename to pkg/app/state/editor_state.go diff --git a/pkg/common/state/tool_window_state.go b/pkg/app/state/tool_window_state.go similarity index 100% rename from pkg/common/state/tool_window_state.go rename to pkg/app/state/tool_window_state.go diff --git a/pkg/common/state/window_state.go b/pkg/app/state/window_state.go similarity index 100% rename from pkg/common/state/window_state.go rename to pkg/app/state/window_state.go diff --git a/pkg/config/config.go b/pkg/config/config.go index 72143a51..4259c115 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -3,6 +3,7 @@ package config import ( "encoding/json" "fmt" + "github.com/gucio321/HellSpawner/pkg/app/state" "image/color" "log" "os" @@ -11,8 +12,6 @@ import ( "github.com/gucio321/HellSpawner/pkg/common/enum" "github.com/gucio321/HellSpawner/pkg/common/hsutil" - "github.com/gucio321/HellSpawner/pkg/common/state" - "github.com/kirsle/configdir" ) diff --git a/pkg/window/editor/editor.go b/pkg/window/editor/editor.go index 363c60f4..9fa6f189 100644 --- a/pkg/window/editor/editor.go +++ b/pkg/window/editor/editor.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "github.com/gucio321/HellSpawner/pkg/app/state" "log" "github.com/AllenDang/giu" @@ -11,7 +12,6 @@ import ( "github.com/gucio321/HellSpawner/pkg/common/hsproject" "github.com/gucio321/HellSpawner/pkg/common" - "github.com/gucio321/HellSpawner/pkg/common/state" "github.com/gucio321/HellSpawner/pkg/window" ) diff --git a/pkg/window/toolwindow/console/console.go b/pkg/window/toolwindow/console/console.go index 7efd79fe..9f19d0fa 100644 --- a/pkg/window/toolwindow/console/console.go +++ b/pkg/window/toolwindow/console/console.go @@ -3,11 +3,11 @@ package console import ( "fmt" + "github.com/gucio321/HellSpawner/pkg/app/state" "os" g "github.com/AllenDang/giu" - "github.com/gucio321/HellSpawner/pkg/common/state" "github.com/gucio321/HellSpawner/pkg/window/toolwindow" ) diff --git a/pkg/window/toolwindow/mpqexplorer/mpqexplorer.go b/pkg/window/toolwindow/mpqexplorer/mpqexplorer.go index 4effae14..c64d3035 100644 --- a/pkg/window/toolwindow/mpqexplorer/mpqexplorer.go +++ b/pkg/window/toolwindow/mpqexplorer/mpqexplorer.go @@ -3,6 +3,7 @@ package mpqexplorer import ( + "github.com/gucio321/HellSpawner/pkg/app/state" "log" "os" "path" @@ -17,7 +18,6 @@ import ( "github.com/gucio321/HellSpawner/pkg/common" "github.com/gucio321/HellSpawner/pkg/common/hsproject" "github.com/gucio321/HellSpawner/pkg/common/hsutil" - "github.com/gucio321/HellSpawner/pkg/common/state" "github.com/gucio321/HellSpawner/pkg/config" "github.com/gucio321/HellSpawner/pkg/widgets" "github.com/gucio321/HellSpawner/pkg/window/toolwindow" diff --git a/pkg/window/toolwindow/projectexplorer/projectexplorer.go b/pkg/window/toolwindow/projectexplorer/projectexplorer.go index 3cc8a2ee..885fff16 100644 --- a/pkg/window/toolwindow/projectexplorer/projectexplorer.go +++ b/pkg/window/toolwindow/projectexplorer/projectexplorer.go @@ -2,6 +2,7 @@ package projectexplorer import ( + "github.com/gucio321/HellSpawner/pkg/app/state" "log" "os" "path/filepath" @@ -19,7 +20,6 @@ import ( "github.com/gucio321/HellSpawner/pkg/common/hsfiletypes" "github.com/gucio321/HellSpawner/pkg/common/hsproject" "github.com/gucio321/HellSpawner/pkg/common/hsutil" - "github.com/gucio321/HellSpawner/pkg/common/state" "github.com/gucio321/HellSpawner/pkg/widgets" "github.com/gucio321/HellSpawner/pkg/window/toolwindow" ) diff --git a/pkg/window/toolwindow/toolwindow.go b/pkg/window/toolwindow/toolwindow.go index e88b4a6b..5a7702c3 100644 --- a/pkg/window/toolwindow/toolwindow.go +++ b/pkg/window/toolwindow/toolwindow.go @@ -2,7 +2,7 @@ package toolwindow import ( "github.com/AllenDang/giu" - "github.com/gucio321/HellSpawner/pkg/common/state" + "github.com/gucio321/HellSpawner/pkg/app/state" "github.com/gucio321/HellSpawner/pkg/window" ) diff --git a/pkg/window/window.go b/pkg/window/window.go index 64a88c34..0a32212d 100644 --- a/pkg/window/window.go +++ b/pkg/window/window.go @@ -2,8 +2,7 @@ package window import ( "github.com/AllenDang/giu" - - "github.com/gucio321/HellSpawner/pkg/common/state" + "github.com/gucio321/HellSpawner/pkg/app/state" ) // Window represents project's window