wire: omit the local package identifier if it matches the package name (google/go-cloud#385)

Fixes google/go-cloud#424
This commit is contained in:
Robert van Gent
2018-09-12 14:05:54 -07:00
committed by Ross Light
parent c999a4d1b5
commit a8c7c0b8e1
10 changed files with 35 additions and 24 deletions

View File

@@ -6,7 +6,7 @@
package main
import (
fmt "fmt"
"fmt"
)
// Injectors from foo.go:

View File

@@ -6,7 +6,7 @@
package main
import (
bar "example.com/bar"
"example.com/bar"
)
// Injectors from wire.go:

View File

@@ -6,7 +6,7 @@
package main
import (
os "os"
"os"
)
// Injectors from wire.go:

View File

@@ -6,7 +6,7 @@
package main
import (
foo "example.com/foo"
"example.com/foo"
)
// Injectors from wire.go:

View File

@@ -6,8 +6,8 @@
package main
import (
io "io"
strings "strings"
"io"
"strings"
)
// Injectors from wire.go:

View File

@@ -6,10 +6,10 @@
package main
import (
bar "example.com/bar"
baz "example.com/baz"
foo "example.com/foo"
fmt "fmt"
"example.com/bar"
"example.com/baz"
"example.com/foo"
"fmt"
)
// Injectors from wire.go:

View File

@@ -7,9 +7,9 @@ package main
import (
context2 "context"
fmt "fmt"
os "os"
reflect "reflect"
"fmt"
"os"
"reflect"
)
// Injectors from foo.go:

View File

@@ -6,7 +6,7 @@
package main
import (
bar "example.com/bar"
"example.com/bar"
)
// Injectors from wire.go:

View File

@@ -6,7 +6,7 @@
package main
import (
bar "example.com/bar"
"example.com/bar"
)
// Injectors from wire.go: