@@ -9,11 +9,13 @@ import (
99 "text/template"
1010 "time"
1111
12- minimock "github.com/gojuno/minimock/v3"
12+ "github.com/gojuno/minimock/v3"
1313 "github.com/pkg/errors"
1414 "github.com/stretchr/testify/assert"
1515 "github.com/stretchr/testify/require"
1616 "golang.org/x/tools/go/packages"
17+
18+ "github.com/hexdigest/gowrap/pkg"
1719)
1820
1921func Test_unquote (t * testing.T ) {
@@ -478,7 +480,7 @@ func Test_findTarget(t *testing.T) {
478480 name : "not found" ,
479481 args : args {
480482 input : processInput {
481- astPackage : & ast .Package {},
483+ astPackage : & pkg .Package {},
482484 },
483485 },
484486 wantErr : true ,
@@ -490,7 +492,7 @@ func Test_findTarget(t *testing.T) {
490492 name : "found" ,
491493 args : args {
492494 input : processInput {
493- astPackage : & ast .Package {Files : map [string ]* ast.File {
495+ astPackage : & pkg .Package {Files : map [string ]* ast.File {
494496 "file.go" : {
495497 Decls : []ast.Decl {& ast.GenDecl {Tok : token .TYPE , Specs : []ast.Spec {& ast.TypeSpec {
496498 Name : & ast.Ident {Name : "Interface" },
@@ -506,13 +508,14 @@ func Test_findTarget(t *testing.T) {
506508 name : "found interface alias" ,
507509 args : args {
508510 input : processInput {
509- astPackage : & ast .Package {
511+ astPackage : & pkg .Package {
510512 Files : map [string ]* ast.File {
511513 "file.go" : {
512514 Decls : []ast.Decl {& ast.GenDecl {Tok : token .TYPE , Specs : []ast.Spec {& ast.TypeSpec {
513515 Name : & ast.Ident {Name : "InterfaceAlias" },
514516 Type : & ast.Ident {
515517 Name : "Interface" ,
518+ //nolint:staticcheck // SA1019, this is an internal object that is still used by ast library.
516519 Obj : & ast.Object {
517520 Decl : & ast.TypeSpec {
518521 Type : & ast.InterfaceType {},
@@ -531,7 +534,7 @@ func Test_findTarget(t *testing.T) {
531534 name : "found interface alias on exported type" ,
532535 args : args {
533536 input : processInput {
534- astPackage : & ast .Package {
537+ astPackage : & pkg .Package {
535538 Files : map [string ]* ast.File {
536539 "file.go" : {
537540 Decls : []ast.Decl {& ast.GenDecl {Tok : token .TYPE , Specs : []ast.Spec {& ast.TypeSpec {
@@ -583,7 +586,7 @@ func Test_findTarget(t *testing.T) {
583586 name : "found interface alias on exported type with named package" ,
584587 args : args {
585588 input : processInput {
586- astPackage : & ast .Package {
589+ astPackage : & pkg .Package {
587590 Files : map [string ]* ast.File {
588591 "file.go" : {
589592 Decls : []ast.Decl {& ast.GenDecl {Tok : token .TYPE , Specs : []ast.Spec {& ast.TypeSpec {
0 commit comments