From 1c4f593566943d8a0ce16eb3cae77f8c50238202 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 24 Sep 2025 18:44:14 +0900 Subject: internal/app: unexport outcome, remove app struct The App struct no longer does anything, and the outcome struct is entirely opaque. Signed-off-by: Ophestra --- internal/app/process.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'internal/app/process.go') diff --git a/internal/app/process.go b/internal/app/process.go index 0ee123a1..a182fa6c 100644 --- a/internal/app/process.go +++ b/internal/app/process.go @@ -22,7 +22,7 @@ import ( // duration to wait for shim to exit, after container WaitDelay has elapsed. const shimWaitTimeout = 5 * time.Second -// mainState holds persistent state bound to [Outcome.Main]. +// mainState holds persistent state bound to outcome.main. type mainState struct { // done is whether beforeExit has been called already. done bool @@ -33,7 +33,7 @@ type mainState struct { // Time is nil if no process was ever created. Time *time.Time - seal *Outcome + seal *outcome store state.Store cancel context.CancelFunc cmd *exec.Cmd @@ -218,9 +218,8 @@ func (ms mainState) fatal(fallback string, ferr error) { os.Exit(1) } -// Main commits deferred system setup, runs the container, reverts changes to the system, and terminates the program. -// Main does not return. -func (seal *Outcome) Main() { +// main carries out outcome and terminates. main does not return. +func (seal *outcome) main() { if !seal.f.CompareAndSwap(false, true) { panic("outcome: attempted to run twice") } -- cgit v1.3.1