wire: remove trailing CR at end of error about cycles (google/go-cloud#662)

This commit is contained in:
Robert van Gent
2018-11-12 10:15:22 -08:00
committed by Ross Light
parent 282105c273
commit ded9eb899b
2 changed files with 2 additions and 2 deletions

View File

@@ -421,7 +421,7 @@ func verifyAcyclic(providerMap *typeutil.Map, hasher typeutil.Hasher) []error {
p := providerMap.At(curr[j]).(*ProvidedType).Provider() p := providerMap.At(curr[j]).(*ProvidedType).Provider()
fmt.Fprintf(sb, "%s (%s.%s) ->\n", types.TypeString(curr[j], nil), p.Pkg.Path(), p.Name) fmt.Fprintf(sb, "%s (%s.%s) ->\n", types.TypeString(curr[j], nil), p.Pkg.Path(), p.Name)
} }
fmt.Fprintf(sb, "%s\n", types.TypeString(a, nil)) fmt.Fprintf(sb, "%s", types.TypeString(a, nil))
ec.add(errors.New(sb.String())) ec.add(errors.New(sb.String()))
hasCycle = true hasCycle = true
break break

View File

@@ -2,4 +2,4 @@ example.com/foo/wire.go:x:y: cycle for example.com/foo.Bar:
example.com/foo.Bar (example.com/foo.provideBar) -> example.com/foo.Bar (example.com/foo.provideBar) ->
example.com/foo.Foo (example.com/foo.provideFoo) -> example.com/foo.Foo (example.com/foo.provideFoo) ->
example.com/foo.Baz (example.com/foo.provideBaz) -> example.com/foo.Baz (example.com/foo.provideBaz) ->
example.com/foo.Bar example.com/foo.Bar