| CARVIEW |
Select Language
HTTP/2 200
date: Sat, 27 Dec 2025 02:01:52 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"4c8aff077be6c6e65a83f864492604ea"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com github.githubassets.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=mifMUPWMsSRzSBhFg%2B0BMeUgDAK1NJkkXr1INOMWP7aWYru07IYvGJHU0QErWF3Tx9uG94zf48TVOPvXszZ1DtMtKwrnQcSAKsMnEsfLvPvCn3d9JR3E4726uzypsfdOq%2BA2p4usO7%2BV7mi4jf0r88FUk5VXpGGjugY51hhhwUsy%2B%2Bc5FslxsDbJG8ikXMikedv88r6WLkuPyliSMOaz5WGpUdBmkeDB7H2jk%2FMIeBXZYhSd7mJuTxgaVRsw6tA1AgIla%2FjNEoIQ%2FClYhF0nBw%3D%3D--jGLv3%2FwEnQx0wm1C--8ekyq3jYADdVxqK%2BWc2qjA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.228880703.1766800911; Path=/; Domain=github.com; Expires=Sun, 27 Dec 2026 02:01:51 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 27 Dec 2026 02:01:51 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9292:3AC056:3DFD0FD:4A9C0DC:694F3E0F
Releases · samber/do · GitHub
Loading
Loading
09 May 23:07
Loading
Loading
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 102
Releases: samber/do
Releases · samber/do
v2.0.0
🧭 Migration notes
Migration guide available: https://do.samber.dev/docs/upgrading/from-v1-x-to-v2
⚠️ Breaking changes
do.Injectorstruct turned into an interfaceinjector.ListProvidedServicesnow returns[]do.ServiceDescriptioninjector.ListInvokedServicesnow returns[]do.ServiceDescription- No more panic propagation on Provider error
- Service name in internal registry (eg:
*mypkg.MyService->*github.com/samber/example.MyService) - Hooks have been turned into now slices of hooks
injector.ShutdownOnSignalsandinjector.ShutdownOnSIGTERMnow returns(os.Signal, error)
🆕 Features
- New
Scope(formerlyInjector) with a tree structure:RootScope, child scopes, local or inherited services. - Support for transient services: ability to create services that are instantiated on every invocation through a dedicated mode.
- Support for service aliasing and invocation via interface binding
- Populate a struct and invoke services when
do:""tag is defined on attributes - Improved dependency graph troubleshooting: DAG representation, better tracing of service and scope chains. Added HTTP routes for easier troubleshooting.
- Circular dependency detection between services, with controlled panic instead of silent failure.
- Optional stack trace collection when invoking services for debugging purposes.
- Better error handling in Providers: panics are now converted into error.
- Support for
HealthcheckandShutdowninterfaces, with thread-safe shutdown and invocation handling. - More hooks
🛠️ Improvements
- Consistent error format.
- Extended test suite with improved coverage (> 90 % target).
- Refactorings: removed dead code, reduced
// @TODOs. - Implicit service names now include package path to avoid conflicts.
- Thread safe service loading and shutdown
- Parallel service health check and unload
- Health checks and shutdown methods now receive an optional context and support timeouts
🔍 Doc
- More lightweight
README.md: the documentation moved to https://do.samber.dev . - LLM-ready documentation
Assets 2
10 people reacted
v2.0.0-rc1
Improvements
- the
do.ShutdownXXXmethods now return*do.ShutdownReport do.InvokeStruct[T]now returnsTinstead of*Tdo.InvokeStructnow supports implicit type aliasing- fixed cross-scope service alias
do.Service[T]is not exported anymore- better thread safety
- 93% test coverage
- more examples
- lots of doc improvements
- code quality improvements
...and lots of micro-fixes
See #45
Assets 2
1 person reacted
v2.0.0-beta.7
v2.0.0-beta.6
- more tests
- fix typo in doc
- adding package abstraction (see doc)
- fix memory leak for invocation stacktraces
- shutdown services even if we detect a circular dependency
- upgrade go-type-to-string (improved interface naming)
- add support for multple hook handlers
- add hook at runtime
Assets 2
2 people reacted
v2.0.0-beta.5
v2.0.0-beta.4
v2.0.0-beta.3
v2.0.0-beta.2
v2.0.0-beta.1
v1.6.0
Adds injector.ShutdownOnSignals(...) helper that receives a custom list of signals to listen.
Assets 2
3 people reacted
Previous Next
You can’t perform that action at this time.