aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/99designs/gqlgen/codegen/templates/import.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/99designs/gqlgen/codegen/templates/import.go')
-rw-r--r--vendor/github.com/99designs/gqlgen/codegen/templates/import.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/99designs/gqlgen/codegen/templates/import.go b/vendor/github.com/99designs/gqlgen/codegen/templates/import.go
index effe9a0d..d5bd16a6 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/templates/import.go
+++ b/vendor/github.com/99designs/gqlgen/codegen/templates/import.go
@@ -4,6 +4,7 @@ import (
"fmt"
"go/types"
"strconv"
+ "strings"
"github.com/99designs/gqlgen/internal/code"
)
@@ -20,7 +21,7 @@ type Imports struct {
}
func (i *Import) String() string {
- if i.Alias == i.Name {
+ if strings.HasSuffix(i.Path, i.Alias) {
return strconv.Quote(i.Path)
}