Skip to content

Commit

Permalink
已解决遇到变长参数时没有补包名的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyile committed Dec 9, 2024
1 parent fc3cfb9 commit aea050e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cls_stub_gen/stub_gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Param struct{}

func (a *A) Who(param ...Param) {}

func (a *A) How(param ...Param) {}
func (a *A) How(param ...*Param) {}

func TestGenerateMethodsStub(t *testing.T) {
res := GenerateStubMethods(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ type Param struct{}

func (a *A) Who(param ...Param) {}

func (a *A) How(param ...Param) {}
func (a *A) How(param ...*Param) {}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ func Sub(x int, y int) (int, error) {
func Who(param ...example0.Param) {
example0.STUB1.Who(param...)
}
func How(param ...example0.Param) {
func How(param ...*example0.Param) {
example0.STUB1.How(param...)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ func Sub(x int, y int) (int, error) {
func Who(param ...example0.Param) {
example0.STUB2.Who(param...)
}
func How(param ...example0.Param) {
func How(param ...*example0.Param) {
example0.STUB2.How(param...)
}

0 comments on commit aea050e

Please sign in to comment.