v0.3.0
Wire version 0.3.0 is the first release we are marking as beta. With this release, we are committing to API stability: we do not intend to make backward-incompatible changes going forward. There are new features and breaking changes in this release, see below for details.
To upgrade to v0.3.0, please upgrade both the Wire command and library.
Breaking Changes
- github.com/google/wire is now the single canonical import path. Any code still using github.com/google/go-cloud/wire will no longer be recognized. To upgrade: change github.com/google/go-cloud/wire to github.com/google/wire.
- The second argument of
Bind
is now a pointer type to match argument types in other marker functions. If you have code likewire.Bind(new(Fooer), new(MyFoo)))
, the behavior will change. To upgrade: see the guide for how to migrate.
New Features
- A new marker function
FieldsOf
to inject fields of a struct directly. See the guide for how to use it. - A new marker function
Struct
for struct providers. This will replace the current struct provider syntax in 1.0, so please upgrade as soon as possible. To upgrade: see the guide. - The
wire help
command will be more useful. You can usewire help
to list available commands and their descriptions; you can also usewire help [command]
to get more detailed information. - A new
--header_file
flag togen
anddiff
commands for copying copyright headers.
Support using awire:”-”
tag to prevent filling certain struct fields. - Misc stability and documentation improvements.