From 87b5c30ef6d5b7b8a10d6a5a8610054c403923e6 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 9 Oct 2025 05:04:08 +0900 Subject: message: relocate from container This package is quite useful. This change allows it to be imported without importing container. Signed-off-by: Ophestra --- internal/app/state/multi.go | 6 +++--- internal/app/state/multi_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/app/state') diff --git a/internal/app/state/multi.go b/internal/app/state/multi.go index 244b5c56..ca608f58 100644 --- a/internal/app/state/multi.go +++ b/internal/app/state/multi.go @@ -11,8 +11,8 @@ import ( "sync" "syscall" - "hakurei.app/container" "hakurei.app/hst" + "hakurei.app/message" ) // fine-grained locking and access @@ -22,7 +22,7 @@ type multiStore struct { // initialised backends backends *sync.Map - msg container.Msg + msg message.Msg mu sync.RWMutex } @@ -280,7 +280,7 @@ func (b *multiBackend) close() error { } // NewMulti returns an instance of the multi-file store. -func NewMulti(msg container.Msg, runDir string) Store { +func NewMulti(msg message.Msg, runDir string) Store { return &multiStore{ msg: msg, base: path.Join(runDir, "state"), diff --git a/internal/app/state/multi_test.go b/internal/app/state/multi_test.go index b8e1db9b..fd994438 100644 --- a/internal/app/state/multi_test.go +++ b/internal/app/state/multi_test.go @@ -4,10 +4,10 @@ import ( "log" "testing" - "hakurei.app/container" "hakurei.app/internal/app/state" + "hakurei.app/message" ) func TestMulti(t *testing.T) { - testStore(t, state.NewMulti(container.NewMsg(log.New(log.Writer(), "multi: ", 0)), t.TempDir())) + testStore(t, state.NewMulti(message.NewMsg(log.New(log.Writer(), "multi: ", 0)), t.TempDir())) } -- cgit v1.3.1