Library / SDK
go-spring/go-spring avatar
go-spring/go-spring

Go-Spring: An IoC and IDL-First Assembly Layer for Go, Not Another RPC Framework

[released] IoC IDLs-First Go ( All-in-One Development Framework on IoC and IDLs-First for Go ).

1,798 stars233 forksGoApache-2.0

At a glance

What is it?
Go-Spring positions itself as a vendor-neutral application platform for Go, combining dependency injection, layered configuration, and lifecycle management. It integrates 70+ third-party SDKs and frameworks as Starters, aiming to fill the assembly gap left by the Go standard library.
Who is it for?
Adopt Go-Spring if you need a neutral assembly layer that unifies DI, configuration, and lifecycle across heterogeneous Go components, and you are comfortable with a young ecosystem that is still maturing. Skip it if you prefer minimal dependencies or already have a coherent stack that works.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The Gap Go-Spring Targets

Go's standard library is deliberately minimal at the application level. There is no built-in dependency injection, no layered configuration convention, no starter-style auto-configuration, and no unified application lifecycle. DI libraries like Wire, fx, and dig solve injection only. Framework ecosystems like Kratos, go-zero, and CloudWeGo orbit their own transport and programming model. Component libraries like dubbo-go, Kitex, and GORM are peers that do not know each other. Go-Spring aims to be the assembly layer that ties these pieces together, without owning any protocol or transport. The README states its mission as building a complete, vendor-neutral application ecosystem for Go, filling a niche that is essentially empty.

Architecture: Strict Layers and One-Way Dependencies

The repository is organized into strictly ordered layers. The Foundation layer contains zero-dependency utilities, HTTP client/server, and a logging engine. The Core layer has the IoC container, DI, config engine, and application lifecycle. The Ecosystem Library provides container-free abstractions for governance, discovery, cache, and repository, and it imports no spring package. The Integration layer is where 70+ Starters live, each wrapping a third-party SDK or framework with gs wiring. Tooling includes a CLI, code generation, and mocking utilities. The rule is that abstractions go in cloud, third-party SDKs and wiring go in a starter, and pure semantics with no ecosystem dependency go in stdlib. This separation is meant to keep the stack clean, but it also means you must understand which layer a capability belongs to before you can use it effectively.

How It Works: Modules, Config, and Governance

The core mechanism is the gs.Module, which is the unit of assembly. Starters integrate frameworks like dubbo-go, Kitex, Kratos, and go-zero using the same mechanism as Redis or MySQL, making them symmetric. Configuration flows through a layered engine that reads from CLI, environment variables, files, and remote sources like Nacos, etcd, Consul, Vault, and Kubernetes. The gs.Dync[T] type provides hot reload for configuration values. Governance is centralized under a ${govern} config block, applying timeout, retry, breaker, rate limit, and fault injection uniformly across components. The README gives a concrete example of dubbo-go, Kitex, and others appearing as one Starter among 70, integrated by the same mechanism. This is a different approach from frameworks that own their own config model and governance scoped to their own RPC calls.

Getting Started: Commands and Configuration

The README mentions the gs CLI and code generation tools, but does not provide explicit installation commands. You would typically clone the repository or use Go modules to import the core package. The configuration keys are hinted at: the layered engine reads CLI, env, files, and remote sources, and the governance center uses a ${govern} config. The gs.Dync[T] type is used for hot reload. For a minimal setup, you would create a Go module, import the spring package, define a struct with fields annotated for injection, and use gs.Module to wire dependencies. The README references examples in the examples/ directory and templates in layout/, but does not show a concrete main function. You would need to consult the spring/README.md for a comparison with Wire, fx, and dig, and the ARCHITECTURE.md for module inventory.

Limitations and Wrong Tool Cases

Go-Spring is not a microservice framework. If you need a transport layer, it does not provide one; you must bring your own. The README is explicit that it owns no protocol and no transport. That means for a simple service that just needs HTTP, the standard library plus a lightweight router might be enough, and adding Go-Spring adds complexity. The ecosystem is large, but the README does not list which of the 70+ Starters are maintained or what their quality is. The hot-reload feature is claimed, but there is no documentation of its failure modes, such as partial updates or inconsistent state. The IDL-first approach is mentioned in the description, but the README does not explain how IDLs are used beyond the tooling. If your project does not need centralized governance or cross-component configuration, the overhead may not be justified.

Alternatives: DI Libraries vs. Framework Ecosystems

The README itself compares Go-Spring with Wire, fx, and dig, noting they solve injection only, with no config engine, starter model, or lifecycle. If you only need dependency injection, Wire is a code-generation tool that is compile-time safe, while fx provides runtime DI with lifecycle hooks. Go-Spring goes further, but that extra comes with a learning curve. On the other end, Kratos and go-zero are framework-centric ecosystems that own transport, layout, and codegen. Adopting one means committing to its programming model. Go-Spring integrates them as Starters, so you can use Kratos for transport and Go-Spring for assembly. The trade-off is that Go-Spring's abstraction layer adds indirection, and you must learn its module and config conventions. The README argues that Go-Spring competes with nothing in your stack, but in practice you are adopting its assembly model.

Maintenance and Licensing Considerations

The project is licensed under Apache-2.0, which is permissive for commercial use. The last push was June 2026, and the latest release is v1.3.2, indicating active development. However, the release history shows a gap: v1.1.3 was in October 2022, then v1.3.0 in May 2026, and v1.3.2 in June 2026. That is a long period without releases, which could indicate a rewrite or a period of low activity. The repository is not archived, so it is still maintained, but you should check the commit history for the specific Starters you plan to use. The README mentions 70+ Starters, but it does not list them all or their individual maintenance status. Upgrading between versions may involve changes in the module API, and the README does not provide a migration guide. You should plan to test thoroughly after any upgrade, especially if you rely on hot-reload or governance features.

Editorial conclusion

Adopt Go-Spring if you need a neutral assembly layer that unifies DI, configuration, and lifecycle across heterogeneous Go components, and you are comfortable with a young ecosystem that is still maturing. Skip it if you prefer minimal dependencies or already have a coherent stack that works. Before adoption, verify that the specific Starters you need are maintained, check the IDL-first tooling for your IDL (e.g., gRPC, Thrift), and test the hot-reload behavior of gs.Dync[T] in your deployment environment, since the README claims it but does not detail failure modes.

Official sources

  1. Official README
  2. Project repository
  3. Release notes
Community notes

Community notes