All checks were successful
		
		
	
	Test / Sandbox (race detector) (push) Successful in 4m7s
				
			Test / Hakurei (race detector) (push) Successful in 4m55s
				
			Test / Flake checks (push) Successful in 1m27s
				
			Test / Create distribution (push) Successful in 33s
				
			Test / Sandbox (push) Successful in 2m11s
				
			Test / Hakurei (push) Successful in 3m9s
				
			Test / Hpkg (push) Successful in 4m1s
				
			This is less ambiguous, and more accurately describes the purpose of the package. Signed-off-by: Ophestra <cat@gensokyo.uk>
		
			
				
	
	
		
			28 lines
		
	
	
		
			555 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			555 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package outcome
 | |
| 
 | |
| import (
 | |
| 	"context"
 | |
| 	"log"
 | |
| 	"os"
 | |
| 
 | |
| 	"hakurei.app/hst"
 | |
| 	"hakurei.app/message"
 | |
| )
 | |
| 
 | |
| // Main runs an app according to [hst.Config] and terminates. Main does not return.
 | |
| func Main(ctx context.Context, msg message.Msg, config *hst.Config) {
 | |
| 	var id hst.ID
 | |
| 	if err := hst.NewInstanceID(&id); err != nil {
 | |
| 		log.Fatal(err.Error())
 | |
| 	}
 | |
| 
 | |
| 	seal := outcome{syscallDispatcher: direct{msg}}
 | |
| 	if err := seal.finalise(ctx, msg, &id, config); err != nil {
 | |
| 		printMessageError("cannot seal app:", err)
 | |
| 		os.Exit(1)
 | |
| 	}
 | |
| 
 | |
| 	seal.main(msg)
 | |
| 	panic("unreachable")
 | |
| }
 |