wire: clean up README (google/go-cloud#100)

Summary of changes:

-   Rewrote introduction (fixes google/go-cloud#81).
-   Simplified `go generate` explanation by automatically adding the
    comment line to the output.
-   Removed mentions of Dagger. Wire stands enough on its own now, but
    Dagger's influence lives on in our minds.
-   Moved best practices to bottom and removed provider set grouping
    guidance.
This commit is contained in:
Ross Light
2018-06-19 08:04:59 -07:00
parent b12449f9e3
commit cd52d44251
2 changed files with 68 additions and 65 deletions

View File

@@ -168,7 +168,10 @@ func (g *gen) frame() []byte {
return nil
}
var buf bytes.Buffer
buf.WriteString("// Code generated by gowire. DO NOT EDIT.\n\n//+build !wireinject\n\npackage ")
buf.WriteString("// Code generated by gowire. DO NOT EDIT.\n\n")
buf.WriteString("//go:generate gowire\n")
buf.WriteString("//+build !wireinject\n\n")
buf.WriteString("package ")
buf.WriteString(g.prog.Package(g.currPackage).Pkg.Name())
buf.WriteString("\n\n")
if len(g.imports) > 0 {