File tree 4 files changed +7
-1
lines changed
4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ package http
2
+
3
+ type MyStruct struct {}
Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ package test
3
3
import (
4
4
"net/http"
5
5
6
+ number_dir_http "github.com/vektra/mockery/v2/pkg/fixtures/12345678/http"
6
7
my_http "github.com/vektra/mockery/v2/pkg/fixtures/http"
7
8
)
8
9
9
10
// Example is an example
10
11
type Example interface {
11
12
A () http.Flusher
12
13
B (fixtureshttp string ) my_http.MyStruct
14
+ C (fixtureshttp string ) number_dir_http.MyStruct
13
15
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import (
25
25
26
26
const mockConstructorParamTypeNamePrefix = "mockConstructorTestingT"
27
27
28
- var invalidIdentifierChar = regexp .MustCompile ("[^[:digit:][:alpha:]_]" )
28
+ var invalidIdentifierChar = regexp .MustCompile ("^[[:digit:]]| [^[:digit:][:alpha:]_]" )
29
29
30
30
func DetermineOutputPackageName (
31
31
interfaceFileName string ,
Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ func (s *GeneratorSuite) TestGeneratorPrologueWithMultipleImportsSameName() {
260
260
261
261
expected := `package mocks
262
262
263
+ import _2345678http "github.com/vektra/mockery/v2/pkg/fixtures/12345678/http"
263
264
import fixtureshttp "github.com/vektra/mockery/v2/pkg/fixtures/http"
264
265
import http "net/http"
265
266
import mock "github.com/stretchr/testify/mock"
You can’t perform that action at this time.
0 commit comments