diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-09 05:04:08 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-09 05:18:19 +0900 |
| commit | 87b5c30ef6d5b7b8a10d6a5a8610054c403923e6 (patch) | |
| tree | 805116c39a623bb30fc532af47ea3ed78b7304c0 /internal/app/process.go | |
| parent | df9b77b077d967d35082adb8ab3b00dd67d7bc97 (diff) | |
message: relocate from container
This package is quite useful. This change allows it to be imported without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/process.go')
| -rw-r--r-- | internal/app/process.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/app/process.go b/internal/app/process.go index 32254969..0962e212 100644 --- a/internal/app/process.go +++ b/internal/app/process.go @@ -17,6 +17,7 @@ import ( "hakurei.app/hst" "hakurei.app/internal" "hakurei.app/internal/app/state" + "hakurei.app/message" "hakurei.app/system" ) @@ -40,7 +41,7 @@ type mainState struct { cmdWait chan error k *outcome - container.Msg + message.Msg uintptr } @@ -207,7 +208,7 @@ func (ms mainState) fatal(fallback string, ferr error) { } // main carries out outcome and terminates. main does not return. -func (k *outcome) main(msg container.Msg) { +func (k *outcome) main(msg message.Msg) { if !k.active.CompareAndSwap(false, true) { panic("outcome: attempted to run twice") } @@ -312,10 +313,10 @@ func (k *outcome) main(msg container.Msg) { os.Exit(0) } -// printMessageError prints the error message according to [container.GetErrorMessage], +// printMessageError prints the error message according to [message.GetMessage], // or fallback prepended to err if an error message is not available. func printMessageError(fallback string, err error) { - m, ok := container.GetErrorMessage(err) + m, ok := message.GetMessage(err) if !ok { log.Println(fallback, err) return |
