refactor: consolidate Require API and split lifecycle files

Add RequireOpts, RequireWithOpts, and GetModule. Move helpers to
lifecycle_internal.go and errors to errors.go. Remove unused GenericModule.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 17:58:05 -07:00
parent 4cd218f658
commit a07d9d06ed
4 changed files with 69 additions and 17 deletions
+6
View File
@@ -0,0 +1,6 @@
package app
import "errors"
// ErrModuleNotFound is returned when a module is not found in the lifecycle.
var ErrModuleNotFound = errors.New("module not found")