Documentation
¶
Overview ¶
Package wiring is the application's configurator layer — the outermost ring of the hexagonal architecture. It constructs the Factory and wires all dependencies (driven adapters, IOStreams, build metadata) into it. The assembled Factory is returned to the caller via NewCore; the configurator does not build CLI commands, execute them, or classify errors — those executable-specific concerns belong to the binary entry point (e.g., cmd/np/main.go).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppNameFromArgs ¶
AppNameFromArgs derives the application name from the executable path in args (typically os.Args). It strips the directory component and, on Windows, the .exe extension, so the name matches the binary filename regardless of how it was invoked. Falls back to "app" if args is empty, which indicates an abnormal process launch.
func NewCore ¶
NewCore assembles the application's dependency graph and returns the wired Factory. This is the configurator's only job — it constructs infrastructure (IOStreams, Store, BuildInfo) but does not build CLI commands, execute them, or classify errors. Those responsibilities belong to the executable entry point (e.g., cmd/np/main.go).
The appName parameter identifies the binary (typically derived from os.Args[0] via AppNameFromArgs). The version is injected at build time via ldflags into the package-level variable and used automatically.
Types ¶
This section is empty.