Commit graph

3 commits

Author SHA1 Message Date
google-labs-jules[bot]
44dd023c43 docs: Add comprehensive docstrings to Go files (#31)
This commit adds comprehensive docstrings to all Go files in the root of the repository, achieving 100% documentation coverage. Examples have been included where appropriate to improve clarity.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-14 14:33:58 +00:00
35400ee927 fix(runtime): Correct NewWithFactories service creation loop (#30)
Previously, the `NewWithFactories` function in `runtime_pkg.go` iterated over an empty slice, which prevented any services from being created from the provided factories. This commit fixes the loop to correctly iterate over the keys of the `factories` map, ensuring that services are properly instantiated and registered.

feat(testing): Add Good, Bad, and Ugly tests for NewWithFactories

To improve test quality and ensure the reliability of the `NewWithFactories` function, this commit replaces the existing basic test with a comprehensive test suite following the Good, Bad, Ugly methodology:

- `TestNewWithFactories_Good`: Verifies the happy path, ensuring a service is created and registered successfully.
- `TestNewWithFactories_Bad`: Checks that the function correctly returns an error when a service factory fails.
- `TestNewWithFactories_Ugly`: Confirms that the function panics when a `nil` factory is provided, as this represents an unrecoverable programmer error.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-13 21:23:56 +00:00
003996b148 refactor: Flatten repository structure (#28)
- Move Go files from core, e, and runtime directories to the project root.
- Unify package declarations to a single 'core' package.
- Update go.work to exclude the cmd directory from the main build.
- Resolve naming conflicts and update import paths.
- Fix tests to work with the new structure.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-13 18:47:46 +00:00
Renamed from runtime/runtime.go (Browse further)