Compare commits
43 Commits
e7d0d3b298
...
main
Author | SHA1 | Date | |
---|---|---|---|
b713354348 | |||
f5176f5d0d | |||
909e68ad9b | |||
e802731824 | |||
a3cf09fe67 | |||
08b3adb868 | |||
bf89864fb2 | |||
74b1cde8e1 | |||
d32169fd1b | |||
1bc5d8c5cd | |||
79a6522a27 | |||
6a1957912c | |||
47231c414a | |||
6497645aa6 | |||
9f77229e9b | |||
48f3368cda | |||
dee8be81f7 | |||
bf8b83536d | |||
237e6f1fa5 | |||
30fa0717d0 | |||
f1f8ce7a54 | |||
b6ae5004ea | |||
e7936ebb48 | |||
598b45c53f | |||
4c91705260 | |||
c45bb6e670 | |||
f32a95a30c | |||
7d380b524e | |||
bcf3dab61c | |||
d7e4ff5429 | |||
81dd968a32 | |||
dbf5125152 | |||
d85c88993e | |||
ffc9403000 | |||
a2207b25e3
|
|||
055464f0ef
|
|||
6800928f88 | |||
34cf063577 | |||
|
5d3d962614 | ||
|
514e30653d | ||
|
ef8b268d53 | ||
|
ab5b7bc086 | ||
|
b4465d5f96 |
9
.drone.yml
Executable file
9
.drone.yml
Executable file
@@ -0,0 +1,9 @@
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: "test"
|
||||
steps:
|
||||
- name: test
|
||||
image: harbor.front.kjuulh.io/docker-proxy/library/bash:latest
|
||||
commands:
|
||||
- echo 'Run tests'
|
16
.github/workflows/test.yml
vendored
16
.github/workflows/test.yml
vendored
@@ -13,27 +13,27 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
go-version: [1.14.x, 1.15.x]
|
||||
os: [ubuntu-latest,macos-latest,windows-latest]
|
||||
go-version: [1.14.x, 1.15.x, 1.17.x, 1.18.x]
|
||||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-new-combinations
|
||||
include:
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
go-version: 1.15.x
|
||||
go-version: 1.14.x
|
||||
- os: macos-latest
|
||||
go-version: 1.15.x
|
||||
go-version: 1.14.x
|
||||
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# See https://github.com/actions/cache/blob/master/examples.md#go---modules
|
||||
- name: Cache Go Modules
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
|
@@ -20,6 +20,8 @@ archives:
|
||||
windows: Windows
|
||||
386: i386
|
||||
amd64: x86_64
|
||||
universal_binaries:
|
||||
- replace: false
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
|
12
go.mod
12
go.mod
@@ -1,8 +1,16 @@
|
||||
module github.com/matryer/moq
|
||||
|
||||
go 1.14
|
||||
go 1.23.0
|
||||
|
||||
toolchain go1.24.1
|
||||
|
||||
require (
|
||||
github.com/pmezard/go-difflib v1.0.0
|
||||
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3
|
||||
golang.org/x/tools v0.31.0
|
||||
)
|
||||
|
||||
require (
|
||||
golang.org/x/mod v0.24.0 // indirect
|
||||
golang.org/x/sync v0.12.0 // indirect
|
||||
golang.org/x/sys v0.31.0 // indirect
|
||||
)
|
||||
|
160
go.sum
160
go.sum
@@ -1,24 +1,156 @@
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
|
||||
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
|
||||
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
|
||||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
|
||||
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
|
||||
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY=
|
||||
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
|
||||
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
|
||||
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
|
||||
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
|
||||
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
|
||||
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
|
||||
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
|
||||
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
|
||||
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
|
||||
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
|
||||
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
|
||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3 h1:0aScV/0rLmANzEYIhjCOi2pTvDyhZNduBUMD2q3iqs4=
|
||||
golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=
|
||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE=
|
||||
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
|
||||
golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM=
|
||||
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
|
||||
golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4=
|
||||
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
|
||||
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
|
||||
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
|
||||
golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y=
|
||||
golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4=
|
||||
golang.org/x/tools v0.9.0 h1:CtBMYmb33qYal6XpayZzNXlyK/3FpZV8bDq4CZo57b8=
|
||||
golang.org/x/tools v0.9.0/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
|
||||
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||
golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc=
|
||||
golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8=
|
||||
golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
|
||||
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
|
||||
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
|
||||
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
|
||||
golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=
|
||||
golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk=
|
||||
golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
|
||||
golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
|
||||
golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
|
||||
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
|
||||
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
|
||||
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||
golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
|
||||
golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
|
||||
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
|
||||
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
|
||||
golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE=
|
||||
golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg=
|
||||
golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
|
||||
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
|
||||
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
|
||||
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
|
||||
golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8=
|
||||
golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw=
|
||||
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
|
||||
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
|
||||
golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
|
||||
golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
|
||||
golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
|
||||
golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
@@ -169,7 +169,7 @@ func parseImportsAliases(pkg *packages.Package) map[string]string {
|
||||
aliases := make(map[string]string)
|
||||
for _, syntax := range pkg.Syntax {
|
||||
for _, imprt := range syntax.Imports {
|
||||
if imprt.Name != nil && imprt.Name.Name != "." {
|
||||
if imprt.Name != nil && imprt.Name.Name != "." && imprt.Name.Name != "_" {
|
||||
aliases[strings.Trim(imprt.Path.Value, `"`)] = imprt.Name.Name
|
||||
}
|
||||
}
|
||||
|
@@ -49,7 +49,12 @@ func varName(vr *types.Var, suffix string) string {
|
||||
switch name {
|
||||
case "mock", "callInfo", "break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct",
|
||||
"chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "type", "continue", "for",
|
||||
"import", "return", "var":
|
||||
"import", "return", "var",
|
||||
// avoid shadowing basic types
|
||||
"string", "bool", "byte", "rune", "uintptr",
|
||||
"int", "int8", "int16", "int32", "int64",
|
||||
"uint", "uint8", "uint16", "uint32", "uint64",
|
||||
"float32", "float64", "complex64", "complex128":
|
||||
name += "MoqParam"
|
||||
}
|
||||
|
||||
|
10
main.go
10
main.go
@@ -22,6 +22,7 @@ type userFlags struct {
|
||||
formatter string
|
||||
stubImpl bool
|
||||
skipEnsure bool
|
||||
remove bool
|
||||
args []string
|
||||
}
|
||||
|
||||
@@ -35,6 +36,7 @@ func main() {
|
||||
printVersion := flag.Bool("version", false, "show the version for moq")
|
||||
flag.BoolVar(&flags.skipEnsure, "skip-ensure", false,
|
||||
"suppress mock implementation check, avoid import cycle if mocks generated outside of the tested package")
|
||||
flag.BoolVar(&flags.remove, "rm", false, "first remove output file, if it exists")
|
||||
|
||||
flag.Usage = func() {
|
||||
fmt.Println(`moq [flags] source-dir interface [interface2 [interface3 [...]]]`)
|
||||
@@ -63,6 +65,14 @@ func run(flags userFlags) error {
|
||||
return errors.New("not enough arguments")
|
||||
}
|
||||
|
||||
if flags.remove && flags.outFile != "" {
|
||||
if err := os.Remove(flags.outFile); err != nil {
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
var out io.Writer = os.Stdout
|
||||
if flags.outFile != "" {
|
||||
|
@@ -370,6 +370,19 @@ func TestMockGolden(t *testing.T) {
|
||||
interfaces: []string{"Syncer"},
|
||||
goldenFile: filepath.Join("testpackages/syncimport", "syncer_moq.golden.go"),
|
||||
},
|
||||
{
|
||||
// Tests anonymous imports are not included in the generated mock.
|
||||
name: "AnonymousImport",
|
||||
cfg: Config{SrcDir: "testpackages/anonimport"},
|
||||
interfaces: []string{"Example"},
|
||||
goldenFile: filepath.Join("testpackages/anonimport", "iface_moq.golden.go"),
|
||||
},
|
||||
{
|
||||
name: "ShadowTypes",
|
||||
cfg: Config{SrcDir: "testpackages/shadowtypes"},
|
||||
interfaces: []string{"ShadowTypes"},
|
||||
goldenFile: filepath.Join("testpackages/shadowtypes", "shadowtypes_moq.golden.go"),
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
9
pkg/moq/testpackages/anonimport/iface.go
Normal file
9
pkg/moq/testpackages/anonimport/iface.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package anonimport
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type Example interface {
|
||||
Ctx(ctx context.Context)
|
||||
}
|
74
pkg/moq/testpackages/anonimport/iface_moq.golden.go
Normal file
74
pkg/moq/testpackages/anonimport/iface_moq.golden.go
Normal file
@@ -0,0 +1,74 @@
|
||||
// Code generated by moq; DO NOT EDIT.
|
||||
// github.com/matryer/moq
|
||||
|
||||
package anonimport
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// Ensure, that ExampleMock does implement Example.
|
||||
// If this is not the case, regenerate this file with moq.
|
||||
var _ Example = &ExampleMock{}
|
||||
|
||||
// ExampleMock is a mock implementation of Example.
|
||||
//
|
||||
// func TestSomethingThatUsesExample(t *testing.T) {
|
||||
//
|
||||
// // make and configure a mocked Example
|
||||
// mockedExample := &ExampleMock{
|
||||
// CtxFunc: func(ctx context.Context) {
|
||||
// panic("mock out the Ctx method")
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// // use mockedExample in code that requires Example
|
||||
// // and then make assertions.
|
||||
//
|
||||
// }
|
||||
type ExampleMock struct {
|
||||
// CtxFunc mocks the Ctx method.
|
||||
CtxFunc func(ctx context.Context)
|
||||
|
||||
// calls tracks calls to the methods.
|
||||
calls struct {
|
||||
// Ctx holds details about calls to the Ctx method.
|
||||
Ctx []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
Ctx context.Context
|
||||
}
|
||||
}
|
||||
lockCtx sync.RWMutex
|
||||
}
|
||||
|
||||
// Ctx calls CtxFunc.
|
||||
func (mock *ExampleMock) Ctx(ctx context.Context) {
|
||||
if mock.CtxFunc == nil {
|
||||
panic("ExampleMock.CtxFunc: method is nil but Example.Ctx was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
}{
|
||||
Ctx: ctx,
|
||||
}
|
||||
mock.lockCtx.Lock()
|
||||
mock.calls.Ctx = append(mock.calls.Ctx, callInfo)
|
||||
mock.lockCtx.Unlock()
|
||||
mock.CtxFunc(ctx)
|
||||
}
|
||||
|
||||
// CtxCalls gets all the calls that were made to Ctx.
|
||||
// Check the length with:
|
||||
// len(mockedExample.CtxCalls())
|
||||
func (mock *ExampleMock) CtxCalls() []struct {
|
||||
Ctx context.Context
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
}
|
||||
mock.lockCtx.RLock()
|
||||
calls = mock.calls.Ctx
|
||||
mock.lockCtx.RUnlock()
|
||||
return calls
|
||||
}
|
5
pkg/moq/testpackages/anonimport/second_file.go
Normal file
5
pkg/moq/testpackages/anonimport/second_file.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package anonimport
|
||||
|
||||
import (
|
||||
_ "context"
|
||||
)
|
@@ -1,5 +1,5 @@
|
||||
module github.com/matryer/moq/pkg/moq/testpackages/buildconstraints
|
||||
|
||||
go 1.14
|
||||
go 1.19
|
||||
|
||||
require github.com/sudo-suhas/moq-test-pkgs/buildconstraints v0.0.0-20200816045313-d2f573eea6c7
|
||||
|
@@ -1,5 +1,5 @@
|
||||
module github.com/matryer/moq/pkg/moq/testpackages
|
||||
|
||||
go 1.14
|
||||
go 1.19
|
||||
|
||||
require github.com/sudo-suhas/moq-test-pkgs/somerepo v0.0.0-20200816045313-d2f573eea6c7
|
||||
|
35
pkg/moq/testpackages/shadowtypes/shadowtypes.go
Normal file
35
pkg/moq/testpackages/shadowtypes/shadowtypes.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package shadowtypes
|
||||
|
||||
import (
|
||||
"github.com/matryer/moq/pkg/moq/testpackages/shadowtypes/types"
|
||||
)
|
||||
|
||||
type ShadowTypes interface {
|
||||
ShadowString(string, types.String)
|
||||
|
||||
ShadowInt(int, types.Int)
|
||||
ShadowInt8(int8, types.Int8)
|
||||
ShadowInt16(int16, types.Int16)
|
||||
ShadowInt32(int32, types.Int32)
|
||||
ShadowInt64(int64, types.Int64)
|
||||
|
||||
ShadowUint(uint, types.Uint)
|
||||
ShadowUint8(uint8, types.Uint8)
|
||||
ShadowUint16(uint16, types.Uint16)
|
||||
ShadowUint32(uint32, types.Uint32)
|
||||
ShadowUint64(uint64, types.Uint64)
|
||||
|
||||
ShadowFloat32(float32, types.Float32)
|
||||
ShadowFloat64(float64, types.Float64)
|
||||
|
||||
ShadowByte(byte, types.Byte)
|
||||
|
||||
ShadowRune(rune, types.Rune)
|
||||
|
||||
ShadowBool(bool, types.Bool)
|
||||
|
||||
ShadowComplex64(complex64, types.Complex64)
|
||||
ShadowComplex128(complex128, types.Complex128)
|
||||
|
||||
ShadowUintptr(uintptr, types.Uintptr)
|
||||
}
|
962
pkg/moq/testpackages/shadowtypes/shadowtypes_moq.golden.go
Normal file
962
pkg/moq/testpackages/shadowtypes/shadowtypes_moq.golden.go
Normal file
@@ -0,0 +1,962 @@
|
||||
// Code generated by moq; DO NOT EDIT.
|
||||
// github.com/matryer/moq
|
||||
|
||||
package shadowtypes
|
||||
|
||||
import (
|
||||
"github.com/matryer/moq/pkg/moq/testpackages/shadowtypes/types"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// Ensure, that ShadowTypesMock does implement ShadowTypes.
|
||||
// If this is not the case, regenerate this file with moq.
|
||||
var _ ShadowTypes = &ShadowTypesMock{}
|
||||
|
||||
// ShadowTypesMock is a mock implementation of ShadowTypes.
|
||||
//
|
||||
// func TestSomethingThatUsesShadowTypes(t *testing.T) {
|
||||
//
|
||||
// // make and configure a mocked ShadowTypes
|
||||
// mockedShadowTypes := &ShadowTypesMock{
|
||||
// ShadowBoolFunc: func(b bool, boolMoqParam types.Bool) {
|
||||
// panic("mock out the ShadowBool method")
|
||||
// },
|
||||
// ShadowByteFunc: func(v byte, byteMoqParam types.Byte) {
|
||||
// panic("mock out the ShadowByte method")
|
||||
// },
|
||||
// ShadowComplex128Func: func(v complex128, complex128MoqParam types.Complex128) {
|
||||
// panic("mock out the ShadowComplex128 method")
|
||||
// },
|
||||
// ShadowComplex64Func: func(v complex64, complex64MoqParam types.Complex64) {
|
||||
// panic("mock out the ShadowComplex64 method")
|
||||
// },
|
||||
// ShadowFloat32Func: func(f float32, float32MoqParam types.Float32) {
|
||||
// panic("mock out the ShadowFloat32 method")
|
||||
// },
|
||||
// ShadowFloat64Func: func(f float64, float64MoqParam types.Float64) {
|
||||
// panic("mock out the ShadowFloat64 method")
|
||||
// },
|
||||
// ShadowIntFunc: func(n int, intMoqParam types.Int) {
|
||||
// panic("mock out the ShadowInt method")
|
||||
// },
|
||||
// ShadowInt16Func: func(n int16, int16MoqParam types.Int16) {
|
||||
// panic("mock out the ShadowInt16 method")
|
||||
// },
|
||||
// ShadowInt32Func: func(n int32, int32MoqParam types.Int32) {
|
||||
// panic("mock out the ShadowInt32 method")
|
||||
// },
|
||||
// ShadowInt64Func: func(n int64, int64MoqParam types.Int64) {
|
||||
// panic("mock out the ShadowInt64 method")
|
||||
// },
|
||||
// ShadowInt8Func: func(n int8, int8MoqParam types.Int8) {
|
||||
// panic("mock out the ShadowInt8 method")
|
||||
// },
|
||||
// ShadowRuneFunc: func(n rune, runeMoqParam types.Rune) {
|
||||
// panic("mock out the ShadowRune method")
|
||||
// },
|
||||
// ShadowStringFunc: func(s string, stringMoqParam types.String) {
|
||||
// panic("mock out the ShadowString method")
|
||||
// },
|
||||
// ShadowUintFunc: func(v uint, uintMoqParam types.Uint) {
|
||||
// panic("mock out the ShadowUint method")
|
||||
// },
|
||||
// ShadowUint16Func: func(v uint16, uint16MoqParam types.Uint16) {
|
||||
// panic("mock out the ShadowUint16 method")
|
||||
// },
|
||||
// ShadowUint32Func: func(v uint32, uint32MoqParam types.Uint32) {
|
||||
// panic("mock out the ShadowUint32 method")
|
||||
// },
|
||||
// ShadowUint64Func: func(v uint64, uint64MoqParam types.Uint64) {
|
||||
// panic("mock out the ShadowUint64 method")
|
||||
// },
|
||||
// ShadowUint8Func: func(v uint8, uint8MoqParam types.Uint8) {
|
||||
// panic("mock out the ShadowUint8 method")
|
||||
// },
|
||||
// ShadowUintptrFunc: func(v uintptr, uintptrMoqParam types.Uintptr) {
|
||||
// panic("mock out the ShadowUintptr method")
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// // use mockedShadowTypes in code that requires ShadowTypes
|
||||
// // and then make assertions.
|
||||
//
|
||||
// }
|
||||
type ShadowTypesMock struct {
|
||||
// ShadowBoolFunc mocks the ShadowBool method.
|
||||
ShadowBoolFunc func(b bool, boolMoqParam types.Bool)
|
||||
|
||||
// ShadowByteFunc mocks the ShadowByte method.
|
||||
ShadowByteFunc func(v byte, byteMoqParam types.Byte)
|
||||
|
||||
// ShadowComplex128Func mocks the ShadowComplex128 method.
|
||||
ShadowComplex128Func func(v complex128, complex128MoqParam types.Complex128)
|
||||
|
||||
// ShadowComplex64Func mocks the ShadowComplex64 method.
|
||||
ShadowComplex64Func func(v complex64, complex64MoqParam types.Complex64)
|
||||
|
||||
// ShadowFloat32Func mocks the ShadowFloat32 method.
|
||||
ShadowFloat32Func func(f float32, float32MoqParam types.Float32)
|
||||
|
||||
// ShadowFloat64Func mocks the ShadowFloat64 method.
|
||||
ShadowFloat64Func func(f float64, float64MoqParam types.Float64)
|
||||
|
||||
// ShadowIntFunc mocks the ShadowInt method.
|
||||
ShadowIntFunc func(n int, intMoqParam types.Int)
|
||||
|
||||
// ShadowInt16Func mocks the ShadowInt16 method.
|
||||
ShadowInt16Func func(n int16, int16MoqParam types.Int16)
|
||||
|
||||
// ShadowInt32Func mocks the ShadowInt32 method.
|
||||
ShadowInt32Func func(n int32, int32MoqParam types.Int32)
|
||||
|
||||
// ShadowInt64Func mocks the ShadowInt64 method.
|
||||
ShadowInt64Func func(n int64, int64MoqParam types.Int64)
|
||||
|
||||
// ShadowInt8Func mocks the ShadowInt8 method.
|
||||
ShadowInt8Func func(n int8, int8MoqParam types.Int8)
|
||||
|
||||
// ShadowRuneFunc mocks the ShadowRune method.
|
||||
ShadowRuneFunc func(n rune, runeMoqParam types.Rune)
|
||||
|
||||
// ShadowStringFunc mocks the ShadowString method.
|
||||
ShadowStringFunc func(s string, stringMoqParam types.String)
|
||||
|
||||
// ShadowUintFunc mocks the ShadowUint method.
|
||||
ShadowUintFunc func(v uint, uintMoqParam types.Uint)
|
||||
|
||||
// ShadowUint16Func mocks the ShadowUint16 method.
|
||||
ShadowUint16Func func(v uint16, uint16MoqParam types.Uint16)
|
||||
|
||||
// ShadowUint32Func mocks the ShadowUint32 method.
|
||||
ShadowUint32Func func(v uint32, uint32MoqParam types.Uint32)
|
||||
|
||||
// ShadowUint64Func mocks the ShadowUint64 method.
|
||||
ShadowUint64Func func(v uint64, uint64MoqParam types.Uint64)
|
||||
|
||||
// ShadowUint8Func mocks the ShadowUint8 method.
|
||||
ShadowUint8Func func(v uint8, uint8MoqParam types.Uint8)
|
||||
|
||||
// ShadowUintptrFunc mocks the ShadowUintptr method.
|
||||
ShadowUintptrFunc func(v uintptr, uintptrMoqParam types.Uintptr)
|
||||
|
||||
// calls tracks calls to the methods.
|
||||
calls struct {
|
||||
// ShadowBool holds details about calls to the ShadowBool method.
|
||||
ShadowBool []struct {
|
||||
// B is the b argument value.
|
||||
B bool
|
||||
// BoolMoqParam is the boolMoqParam argument value.
|
||||
BoolMoqParam types.Bool
|
||||
}
|
||||
// ShadowByte holds details about calls to the ShadowByte method.
|
||||
ShadowByte []struct {
|
||||
// V is the v argument value.
|
||||
V byte
|
||||
// ByteMoqParam is the byteMoqParam argument value.
|
||||
ByteMoqParam types.Byte
|
||||
}
|
||||
// ShadowComplex128 holds details about calls to the ShadowComplex128 method.
|
||||
ShadowComplex128 []struct {
|
||||
// V is the v argument value.
|
||||
V complex128
|
||||
// Complex128MoqParam is the complex128MoqParam argument value.
|
||||
Complex128MoqParam types.Complex128
|
||||
}
|
||||
// ShadowComplex64 holds details about calls to the ShadowComplex64 method.
|
||||
ShadowComplex64 []struct {
|
||||
// V is the v argument value.
|
||||
V complex64
|
||||
// Complex64MoqParam is the complex64MoqParam argument value.
|
||||
Complex64MoqParam types.Complex64
|
||||
}
|
||||
// ShadowFloat32 holds details about calls to the ShadowFloat32 method.
|
||||
ShadowFloat32 []struct {
|
||||
// F is the f argument value.
|
||||
F float32
|
||||
// Float32MoqParam is the float32MoqParam argument value.
|
||||
Float32MoqParam types.Float32
|
||||
}
|
||||
// ShadowFloat64 holds details about calls to the ShadowFloat64 method.
|
||||
ShadowFloat64 []struct {
|
||||
// F is the f argument value.
|
||||
F float64
|
||||
// Float64MoqParam is the float64MoqParam argument value.
|
||||
Float64MoqParam types.Float64
|
||||
}
|
||||
// ShadowInt holds details about calls to the ShadowInt method.
|
||||
ShadowInt []struct {
|
||||
// N is the n argument value.
|
||||
N int
|
||||
// IntMoqParam is the intMoqParam argument value.
|
||||
IntMoqParam types.Int
|
||||
}
|
||||
// ShadowInt16 holds details about calls to the ShadowInt16 method.
|
||||
ShadowInt16 []struct {
|
||||
// N is the n argument value.
|
||||
N int16
|
||||
// Int16MoqParam is the int16MoqParam argument value.
|
||||
Int16MoqParam types.Int16
|
||||
}
|
||||
// ShadowInt32 holds details about calls to the ShadowInt32 method.
|
||||
ShadowInt32 []struct {
|
||||
// N is the n argument value.
|
||||
N int32
|
||||
// Int32MoqParam is the int32MoqParam argument value.
|
||||
Int32MoqParam types.Int32
|
||||
}
|
||||
// ShadowInt64 holds details about calls to the ShadowInt64 method.
|
||||
ShadowInt64 []struct {
|
||||
// N is the n argument value.
|
||||
N int64
|
||||
// Int64MoqParam is the int64MoqParam argument value.
|
||||
Int64MoqParam types.Int64
|
||||
}
|
||||
// ShadowInt8 holds details about calls to the ShadowInt8 method.
|
||||
ShadowInt8 []struct {
|
||||
// N is the n argument value.
|
||||
N int8
|
||||
// Int8MoqParam is the int8MoqParam argument value.
|
||||
Int8MoqParam types.Int8
|
||||
}
|
||||
// ShadowRune holds details about calls to the ShadowRune method.
|
||||
ShadowRune []struct {
|
||||
// N is the n argument value.
|
||||
N rune
|
||||
// RuneMoqParam is the runeMoqParam argument value.
|
||||
RuneMoqParam types.Rune
|
||||
}
|
||||
// ShadowString holds details about calls to the ShadowString method.
|
||||
ShadowString []struct {
|
||||
// S is the s argument value.
|
||||
S string
|
||||
// StringMoqParam is the stringMoqParam argument value.
|
||||
StringMoqParam types.String
|
||||
}
|
||||
// ShadowUint holds details about calls to the ShadowUint method.
|
||||
ShadowUint []struct {
|
||||
// V is the v argument value.
|
||||
V uint
|
||||
// UintMoqParam is the uintMoqParam argument value.
|
||||
UintMoqParam types.Uint
|
||||
}
|
||||
// ShadowUint16 holds details about calls to the ShadowUint16 method.
|
||||
ShadowUint16 []struct {
|
||||
// V is the v argument value.
|
||||
V uint16
|
||||
// Uint16MoqParam is the uint16MoqParam argument value.
|
||||
Uint16MoqParam types.Uint16
|
||||
}
|
||||
// ShadowUint32 holds details about calls to the ShadowUint32 method.
|
||||
ShadowUint32 []struct {
|
||||
// V is the v argument value.
|
||||
V uint32
|
||||
// Uint32MoqParam is the uint32MoqParam argument value.
|
||||
Uint32MoqParam types.Uint32
|
||||
}
|
||||
// ShadowUint64 holds details about calls to the ShadowUint64 method.
|
||||
ShadowUint64 []struct {
|
||||
// V is the v argument value.
|
||||
V uint64
|
||||
// Uint64MoqParam is the uint64MoqParam argument value.
|
||||
Uint64MoqParam types.Uint64
|
||||
}
|
||||
// ShadowUint8 holds details about calls to the ShadowUint8 method.
|
||||
ShadowUint8 []struct {
|
||||
// V is the v argument value.
|
||||
V uint8
|
||||
// Uint8MoqParam is the uint8MoqParam argument value.
|
||||
Uint8MoqParam types.Uint8
|
||||
}
|
||||
// ShadowUintptr holds details about calls to the ShadowUintptr method.
|
||||
ShadowUintptr []struct {
|
||||
// V is the v argument value.
|
||||
V uintptr
|
||||
// UintptrMoqParam is the uintptrMoqParam argument value.
|
||||
UintptrMoqParam types.Uintptr
|
||||
}
|
||||
}
|
||||
lockShadowBool sync.RWMutex
|
||||
lockShadowByte sync.RWMutex
|
||||
lockShadowComplex128 sync.RWMutex
|
||||
lockShadowComplex64 sync.RWMutex
|
||||
lockShadowFloat32 sync.RWMutex
|
||||
lockShadowFloat64 sync.RWMutex
|
||||
lockShadowInt sync.RWMutex
|
||||
lockShadowInt16 sync.RWMutex
|
||||
lockShadowInt32 sync.RWMutex
|
||||
lockShadowInt64 sync.RWMutex
|
||||
lockShadowInt8 sync.RWMutex
|
||||
lockShadowRune sync.RWMutex
|
||||
lockShadowString sync.RWMutex
|
||||
lockShadowUint sync.RWMutex
|
||||
lockShadowUint16 sync.RWMutex
|
||||
lockShadowUint32 sync.RWMutex
|
||||
lockShadowUint64 sync.RWMutex
|
||||
lockShadowUint8 sync.RWMutex
|
||||
lockShadowUintptr sync.RWMutex
|
||||
}
|
||||
|
||||
// ShadowBool calls ShadowBoolFunc.
|
||||
func (mock *ShadowTypesMock) ShadowBool(b bool, boolMoqParam types.Bool) {
|
||||
if mock.ShadowBoolFunc == nil {
|
||||
panic("ShadowTypesMock.ShadowBoolFunc: method is nil but ShadowTypes.ShadowBool was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
B bool
|
||||
BoolMoqParam types.Bool
|
||||
}{
|
||||
B: b,
|
||||
BoolMoqParam: boolMoqParam,
|
||||
}
|
||||
mock.lockShadowBool.Lock()
|
||||
mock.calls.ShadowBool = append(mock.calls.ShadowBool, callInfo)
|
||||
mock.lockShadowBool.Unlock()
|
||||
mock.ShadowBoolFunc(b, boolMoqParam)
|
||||
}
|
||||
|
||||
// ShadowBoolCalls gets all the calls that were made to ShadowBool.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowBoolCalls())
|
||||
func (mock *ShadowTypesMock) ShadowBoolCalls() []struct {
|
||||
B bool
|
||||
BoolMoqParam types.Bool
|
||||
} {
|
||||
var calls []struct {
|
||||
B bool
|
||||
BoolMoqParam types.Bool
|
||||
}
|
||||
mock.lockShadowBool.RLock()
|
||||
calls = mock.calls.ShadowBool
|
||||
mock.lockShadowBool.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowByte calls ShadowByteFunc.
|
||||
func (mock *ShadowTypesMock) ShadowByte(v byte, byteMoqParam types.Byte) {
|
||||
if mock.ShadowByteFunc == nil {
|
||||
panic("ShadowTypesMock.ShadowByteFunc: method is nil but ShadowTypes.ShadowByte was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V byte
|
||||
ByteMoqParam types.Byte
|
||||
}{
|
||||
V: v,
|
||||
ByteMoqParam: byteMoqParam,
|
||||
}
|
||||
mock.lockShadowByte.Lock()
|
||||
mock.calls.ShadowByte = append(mock.calls.ShadowByte, callInfo)
|
||||
mock.lockShadowByte.Unlock()
|
||||
mock.ShadowByteFunc(v, byteMoqParam)
|
||||
}
|
||||
|
||||
// ShadowByteCalls gets all the calls that were made to ShadowByte.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowByteCalls())
|
||||
func (mock *ShadowTypesMock) ShadowByteCalls() []struct {
|
||||
V byte
|
||||
ByteMoqParam types.Byte
|
||||
} {
|
||||
var calls []struct {
|
||||
V byte
|
||||
ByteMoqParam types.Byte
|
||||
}
|
||||
mock.lockShadowByte.RLock()
|
||||
calls = mock.calls.ShadowByte
|
||||
mock.lockShadowByte.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowComplex128 calls ShadowComplex128Func.
|
||||
func (mock *ShadowTypesMock) ShadowComplex128(v complex128, complex128MoqParam types.Complex128) {
|
||||
if mock.ShadowComplex128Func == nil {
|
||||
panic("ShadowTypesMock.ShadowComplex128Func: method is nil but ShadowTypes.ShadowComplex128 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V complex128
|
||||
Complex128MoqParam types.Complex128
|
||||
}{
|
||||
V: v,
|
||||
Complex128MoqParam: complex128MoqParam,
|
||||
}
|
||||
mock.lockShadowComplex128.Lock()
|
||||
mock.calls.ShadowComplex128 = append(mock.calls.ShadowComplex128, callInfo)
|
||||
mock.lockShadowComplex128.Unlock()
|
||||
mock.ShadowComplex128Func(v, complex128MoqParam)
|
||||
}
|
||||
|
||||
// ShadowComplex128Calls gets all the calls that were made to ShadowComplex128.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowComplex128Calls())
|
||||
func (mock *ShadowTypesMock) ShadowComplex128Calls() []struct {
|
||||
V complex128
|
||||
Complex128MoqParam types.Complex128
|
||||
} {
|
||||
var calls []struct {
|
||||
V complex128
|
||||
Complex128MoqParam types.Complex128
|
||||
}
|
||||
mock.lockShadowComplex128.RLock()
|
||||
calls = mock.calls.ShadowComplex128
|
||||
mock.lockShadowComplex128.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowComplex64 calls ShadowComplex64Func.
|
||||
func (mock *ShadowTypesMock) ShadowComplex64(v complex64, complex64MoqParam types.Complex64) {
|
||||
if mock.ShadowComplex64Func == nil {
|
||||
panic("ShadowTypesMock.ShadowComplex64Func: method is nil but ShadowTypes.ShadowComplex64 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V complex64
|
||||
Complex64MoqParam types.Complex64
|
||||
}{
|
||||
V: v,
|
||||
Complex64MoqParam: complex64MoqParam,
|
||||
}
|
||||
mock.lockShadowComplex64.Lock()
|
||||
mock.calls.ShadowComplex64 = append(mock.calls.ShadowComplex64, callInfo)
|
||||
mock.lockShadowComplex64.Unlock()
|
||||
mock.ShadowComplex64Func(v, complex64MoqParam)
|
||||
}
|
||||
|
||||
// ShadowComplex64Calls gets all the calls that were made to ShadowComplex64.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowComplex64Calls())
|
||||
func (mock *ShadowTypesMock) ShadowComplex64Calls() []struct {
|
||||
V complex64
|
||||
Complex64MoqParam types.Complex64
|
||||
} {
|
||||
var calls []struct {
|
||||
V complex64
|
||||
Complex64MoqParam types.Complex64
|
||||
}
|
||||
mock.lockShadowComplex64.RLock()
|
||||
calls = mock.calls.ShadowComplex64
|
||||
mock.lockShadowComplex64.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowFloat32 calls ShadowFloat32Func.
|
||||
func (mock *ShadowTypesMock) ShadowFloat32(f float32, float32MoqParam types.Float32) {
|
||||
if mock.ShadowFloat32Func == nil {
|
||||
panic("ShadowTypesMock.ShadowFloat32Func: method is nil but ShadowTypes.ShadowFloat32 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
F float32
|
||||
Float32MoqParam types.Float32
|
||||
}{
|
||||
F: f,
|
||||
Float32MoqParam: float32MoqParam,
|
||||
}
|
||||
mock.lockShadowFloat32.Lock()
|
||||
mock.calls.ShadowFloat32 = append(mock.calls.ShadowFloat32, callInfo)
|
||||
mock.lockShadowFloat32.Unlock()
|
||||
mock.ShadowFloat32Func(f, float32MoqParam)
|
||||
}
|
||||
|
||||
// ShadowFloat32Calls gets all the calls that were made to ShadowFloat32.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowFloat32Calls())
|
||||
func (mock *ShadowTypesMock) ShadowFloat32Calls() []struct {
|
||||
F float32
|
||||
Float32MoqParam types.Float32
|
||||
} {
|
||||
var calls []struct {
|
||||
F float32
|
||||
Float32MoqParam types.Float32
|
||||
}
|
||||
mock.lockShadowFloat32.RLock()
|
||||
calls = mock.calls.ShadowFloat32
|
||||
mock.lockShadowFloat32.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowFloat64 calls ShadowFloat64Func.
|
||||
func (mock *ShadowTypesMock) ShadowFloat64(f float64, float64MoqParam types.Float64) {
|
||||
if mock.ShadowFloat64Func == nil {
|
||||
panic("ShadowTypesMock.ShadowFloat64Func: method is nil but ShadowTypes.ShadowFloat64 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
F float64
|
||||
Float64MoqParam types.Float64
|
||||
}{
|
||||
F: f,
|
||||
Float64MoqParam: float64MoqParam,
|
||||
}
|
||||
mock.lockShadowFloat64.Lock()
|
||||
mock.calls.ShadowFloat64 = append(mock.calls.ShadowFloat64, callInfo)
|
||||
mock.lockShadowFloat64.Unlock()
|
||||
mock.ShadowFloat64Func(f, float64MoqParam)
|
||||
}
|
||||
|
||||
// ShadowFloat64Calls gets all the calls that were made to ShadowFloat64.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowFloat64Calls())
|
||||
func (mock *ShadowTypesMock) ShadowFloat64Calls() []struct {
|
||||
F float64
|
||||
Float64MoqParam types.Float64
|
||||
} {
|
||||
var calls []struct {
|
||||
F float64
|
||||
Float64MoqParam types.Float64
|
||||
}
|
||||
mock.lockShadowFloat64.RLock()
|
||||
calls = mock.calls.ShadowFloat64
|
||||
mock.lockShadowFloat64.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowInt calls ShadowIntFunc.
|
||||
func (mock *ShadowTypesMock) ShadowInt(n int, intMoqParam types.Int) {
|
||||
if mock.ShadowIntFunc == nil {
|
||||
panic("ShadowTypesMock.ShadowIntFunc: method is nil but ShadowTypes.ShadowInt was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
N int
|
||||
IntMoqParam types.Int
|
||||
}{
|
||||
N: n,
|
||||
IntMoqParam: intMoqParam,
|
||||
}
|
||||
mock.lockShadowInt.Lock()
|
||||
mock.calls.ShadowInt = append(mock.calls.ShadowInt, callInfo)
|
||||
mock.lockShadowInt.Unlock()
|
||||
mock.ShadowIntFunc(n, intMoqParam)
|
||||
}
|
||||
|
||||
// ShadowIntCalls gets all the calls that were made to ShadowInt.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowIntCalls())
|
||||
func (mock *ShadowTypesMock) ShadowIntCalls() []struct {
|
||||
N int
|
||||
IntMoqParam types.Int
|
||||
} {
|
||||
var calls []struct {
|
||||
N int
|
||||
IntMoqParam types.Int
|
||||
}
|
||||
mock.lockShadowInt.RLock()
|
||||
calls = mock.calls.ShadowInt
|
||||
mock.lockShadowInt.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowInt16 calls ShadowInt16Func.
|
||||
func (mock *ShadowTypesMock) ShadowInt16(n int16, int16MoqParam types.Int16) {
|
||||
if mock.ShadowInt16Func == nil {
|
||||
panic("ShadowTypesMock.ShadowInt16Func: method is nil but ShadowTypes.ShadowInt16 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
N int16
|
||||
Int16MoqParam types.Int16
|
||||
}{
|
||||
N: n,
|
||||
Int16MoqParam: int16MoqParam,
|
||||
}
|
||||
mock.lockShadowInt16.Lock()
|
||||
mock.calls.ShadowInt16 = append(mock.calls.ShadowInt16, callInfo)
|
||||
mock.lockShadowInt16.Unlock()
|
||||
mock.ShadowInt16Func(n, int16MoqParam)
|
||||
}
|
||||
|
||||
// ShadowInt16Calls gets all the calls that were made to ShadowInt16.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowInt16Calls())
|
||||
func (mock *ShadowTypesMock) ShadowInt16Calls() []struct {
|
||||
N int16
|
||||
Int16MoqParam types.Int16
|
||||
} {
|
||||
var calls []struct {
|
||||
N int16
|
||||
Int16MoqParam types.Int16
|
||||
}
|
||||
mock.lockShadowInt16.RLock()
|
||||
calls = mock.calls.ShadowInt16
|
||||
mock.lockShadowInt16.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowInt32 calls ShadowInt32Func.
|
||||
func (mock *ShadowTypesMock) ShadowInt32(n int32, int32MoqParam types.Int32) {
|
||||
if mock.ShadowInt32Func == nil {
|
||||
panic("ShadowTypesMock.ShadowInt32Func: method is nil but ShadowTypes.ShadowInt32 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
N int32
|
||||
Int32MoqParam types.Int32
|
||||
}{
|
||||
N: n,
|
||||
Int32MoqParam: int32MoqParam,
|
||||
}
|
||||
mock.lockShadowInt32.Lock()
|
||||
mock.calls.ShadowInt32 = append(mock.calls.ShadowInt32, callInfo)
|
||||
mock.lockShadowInt32.Unlock()
|
||||
mock.ShadowInt32Func(n, int32MoqParam)
|
||||
}
|
||||
|
||||
// ShadowInt32Calls gets all the calls that were made to ShadowInt32.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowInt32Calls())
|
||||
func (mock *ShadowTypesMock) ShadowInt32Calls() []struct {
|
||||
N int32
|
||||
Int32MoqParam types.Int32
|
||||
} {
|
||||
var calls []struct {
|
||||
N int32
|
||||
Int32MoqParam types.Int32
|
||||
}
|
||||
mock.lockShadowInt32.RLock()
|
||||
calls = mock.calls.ShadowInt32
|
||||
mock.lockShadowInt32.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowInt64 calls ShadowInt64Func.
|
||||
func (mock *ShadowTypesMock) ShadowInt64(n int64, int64MoqParam types.Int64) {
|
||||
if mock.ShadowInt64Func == nil {
|
||||
panic("ShadowTypesMock.ShadowInt64Func: method is nil but ShadowTypes.ShadowInt64 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
N int64
|
||||
Int64MoqParam types.Int64
|
||||
}{
|
||||
N: n,
|
||||
Int64MoqParam: int64MoqParam,
|
||||
}
|
||||
mock.lockShadowInt64.Lock()
|
||||
mock.calls.ShadowInt64 = append(mock.calls.ShadowInt64, callInfo)
|
||||
mock.lockShadowInt64.Unlock()
|
||||
mock.ShadowInt64Func(n, int64MoqParam)
|
||||
}
|
||||
|
||||
// ShadowInt64Calls gets all the calls that were made to ShadowInt64.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowInt64Calls())
|
||||
func (mock *ShadowTypesMock) ShadowInt64Calls() []struct {
|
||||
N int64
|
||||
Int64MoqParam types.Int64
|
||||
} {
|
||||
var calls []struct {
|
||||
N int64
|
||||
Int64MoqParam types.Int64
|
||||
}
|
||||
mock.lockShadowInt64.RLock()
|
||||
calls = mock.calls.ShadowInt64
|
||||
mock.lockShadowInt64.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowInt8 calls ShadowInt8Func.
|
||||
func (mock *ShadowTypesMock) ShadowInt8(n int8, int8MoqParam types.Int8) {
|
||||
if mock.ShadowInt8Func == nil {
|
||||
panic("ShadowTypesMock.ShadowInt8Func: method is nil but ShadowTypes.ShadowInt8 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
N int8
|
||||
Int8MoqParam types.Int8
|
||||
}{
|
||||
N: n,
|
||||
Int8MoqParam: int8MoqParam,
|
||||
}
|
||||
mock.lockShadowInt8.Lock()
|
||||
mock.calls.ShadowInt8 = append(mock.calls.ShadowInt8, callInfo)
|
||||
mock.lockShadowInt8.Unlock()
|
||||
mock.ShadowInt8Func(n, int8MoqParam)
|
||||
}
|
||||
|
||||
// ShadowInt8Calls gets all the calls that were made to ShadowInt8.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowInt8Calls())
|
||||
func (mock *ShadowTypesMock) ShadowInt8Calls() []struct {
|
||||
N int8
|
||||
Int8MoqParam types.Int8
|
||||
} {
|
||||
var calls []struct {
|
||||
N int8
|
||||
Int8MoqParam types.Int8
|
||||
}
|
||||
mock.lockShadowInt8.RLock()
|
||||
calls = mock.calls.ShadowInt8
|
||||
mock.lockShadowInt8.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowRune calls ShadowRuneFunc.
|
||||
func (mock *ShadowTypesMock) ShadowRune(n rune, runeMoqParam types.Rune) {
|
||||
if mock.ShadowRuneFunc == nil {
|
||||
panic("ShadowTypesMock.ShadowRuneFunc: method is nil but ShadowTypes.ShadowRune was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
N rune
|
||||
RuneMoqParam types.Rune
|
||||
}{
|
||||
N: n,
|
||||
RuneMoqParam: runeMoqParam,
|
||||
}
|
||||
mock.lockShadowRune.Lock()
|
||||
mock.calls.ShadowRune = append(mock.calls.ShadowRune, callInfo)
|
||||
mock.lockShadowRune.Unlock()
|
||||
mock.ShadowRuneFunc(n, runeMoqParam)
|
||||
}
|
||||
|
||||
// ShadowRuneCalls gets all the calls that were made to ShadowRune.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowRuneCalls())
|
||||
func (mock *ShadowTypesMock) ShadowRuneCalls() []struct {
|
||||
N rune
|
||||
RuneMoqParam types.Rune
|
||||
} {
|
||||
var calls []struct {
|
||||
N rune
|
||||
RuneMoqParam types.Rune
|
||||
}
|
||||
mock.lockShadowRune.RLock()
|
||||
calls = mock.calls.ShadowRune
|
||||
mock.lockShadowRune.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowString calls ShadowStringFunc.
|
||||
func (mock *ShadowTypesMock) ShadowString(s string, stringMoqParam types.String) {
|
||||
if mock.ShadowStringFunc == nil {
|
||||
panic("ShadowTypesMock.ShadowStringFunc: method is nil but ShadowTypes.ShadowString was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
S string
|
||||
StringMoqParam types.String
|
||||
}{
|
||||
S: s,
|
||||
StringMoqParam: stringMoqParam,
|
||||
}
|
||||
mock.lockShadowString.Lock()
|
||||
mock.calls.ShadowString = append(mock.calls.ShadowString, callInfo)
|
||||
mock.lockShadowString.Unlock()
|
||||
mock.ShadowStringFunc(s, stringMoqParam)
|
||||
}
|
||||
|
||||
// ShadowStringCalls gets all the calls that were made to ShadowString.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowStringCalls())
|
||||
func (mock *ShadowTypesMock) ShadowStringCalls() []struct {
|
||||
S string
|
||||
StringMoqParam types.String
|
||||
} {
|
||||
var calls []struct {
|
||||
S string
|
||||
StringMoqParam types.String
|
||||
}
|
||||
mock.lockShadowString.RLock()
|
||||
calls = mock.calls.ShadowString
|
||||
mock.lockShadowString.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowUint calls ShadowUintFunc.
|
||||
func (mock *ShadowTypesMock) ShadowUint(v uint, uintMoqParam types.Uint) {
|
||||
if mock.ShadowUintFunc == nil {
|
||||
panic("ShadowTypesMock.ShadowUintFunc: method is nil but ShadowTypes.ShadowUint was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V uint
|
||||
UintMoqParam types.Uint
|
||||
}{
|
||||
V: v,
|
||||
UintMoqParam: uintMoqParam,
|
||||
}
|
||||
mock.lockShadowUint.Lock()
|
||||
mock.calls.ShadowUint = append(mock.calls.ShadowUint, callInfo)
|
||||
mock.lockShadowUint.Unlock()
|
||||
mock.ShadowUintFunc(v, uintMoqParam)
|
||||
}
|
||||
|
||||
// ShadowUintCalls gets all the calls that were made to ShadowUint.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowUintCalls())
|
||||
func (mock *ShadowTypesMock) ShadowUintCalls() []struct {
|
||||
V uint
|
||||
UintMoqParam types.Uint
|
||||
} {
|
||||
var calls []struct {
|
||||
V uint
|
||||
UintMoqParam types.Uint
|
||||
}
|
||||
mock.lockShadowUint.RLock()
|
||||
calls = mock.calls.ShadowUint
|
||||
mock.lockShadowUint.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowUint16 calls ShadowUint16Func.
|
||||
func (mock *ShadowTypesMock) ShadowUint16(v uint16, uint16MoqParam types.Uint16) {
|
||||
if mock.ShadowUint16Func == nil {
|
||||
panic("ShadowTypesMock.ShadowUint16Func: method is nil but ShadowTypes.ShadowUint16 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V uint16
|
||||
Uint16MoqParam types.Uint16
|
||||
}{
|
||||
V: v,
|
||||
Uint16MoqParam: uint16MoqParam,
|
||||
}
|
||||
mock.lockShadowUint16.Lock()
|
||||
mock.calls.ShadowUint16 = append(mock.calls.ShadowUint16, callInfo)
|
||||
mock.lockShadowUint16.Unlock()
|
||||
mock.ShadowUint16Func(v, uint16MoqParam)
|
||||
}
|
||||
|
||||
// ShadowUint16Calls gets all the calls that were made to ShadowUint16.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowUint16Calls())
|
||||
func (mock *ShadowTypesMock) ShadowUint16Calls() []struct {
|
||||
V uint16
|
||||
Uint16MoqParam types.Uint16
|
||||
} {
|
||||
var calls []struct {
|
||||
V uint16
|
||||
Uint16MoqParam types.Uint16
|
||||
}
|
||||
mock.lockShadowUint16.RLock()
|
||||
calls = mock.calls.ShadowUint16
|
||||
mock.lockShadowUint16.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowUint32 calls ShadowUint32Func.
|
||||
func (mock *ShadowTypesMock) ShadowUint32(v uint32, uint32MoqParam types.Uint32) {
|
||||
if mock.ShadowUint32Func == nil {
|
||||
panic("ShadowTypesMock.ShadowUint32Func: method is nil but ShadowTypes.ShadowUint32 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V uint32
|
||||
Uint32MoqParam types.Uint32
|
||||
}{
|
||||
V: v,
|
||||
Uint32MoqParam: uint32MoqParam,
|
||||
}
|
||||
mock.lockShadowUint32.Lock()
|
||||
mock.calls.ShadowUint32 = append(mock.calls.ShadowUint32, callInfo)
|
||||
mock.lockShadowUint32.Unlock()
|
||||
mock.ShadowUint32Func(v, uint32MoqParam)
|
||||
}
|
||||
|
||||
// ShadowUint32Calls gets all the calls that were made to ShadowUint32.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowUint32Calls())
|
||||
func (mock *ShadowTypesMock) ShadowUint32Calls() []struct {
|
||||
V uint32
|
||||
Uint32MoqParam types.Uint32
|
||||
} {
|
||||
var calls []struct {
|
||||
V uint32
|
||||
Uint32MoqParam types.Uint32
|
||||
}
|
||||
mock.lockShadowUint32.RLock()
|
||||
calls = mock.calls.ShadowUint32
|
||||
mock.lockShadowUint32.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowUint64 calls ShadowUint64Func.
|
||||
func (mock *ShadowTypesMock) ShadowUint64(v uint64, uint64MoqParam types.Uint64) {
|
||||
if mock.ShadowUint64Func == nil {
|
||||
panic("ShadowTypesMock.ShadowUint64Func: method is nil but ShadowTypes.ShadowUint64 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V uint64
|
||||
Uint64MoqParam types.Uint64
|
||||
}{
|
||||
V: v,
|
||||
Uint64MoqParam: uint64MoqParam,
|
||||
}
|
||||
mock.lockShadowUint64.Lock()
|
||||
mock.calls.ShadowUint64 = append(mock.calls.ShadowUint64, callInfo)
|
||||
mock.lockShadowUint64.Unlock()
|
||||
mock.ShadowUint64Func(v, uint64MoqParam)
|
||||
}
|
||||
|
||||
// ShadowUint64Calls gets all the calls that were made to ShadowUint64.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowUint64Calls())
|
||||
func (mock *ShadowTypesMock) ShadowUint64Calls() []struct {
|
||||
V uint64
|
||||
Uint64MoqParam types.Uint64
|
||||
} {
|
||||
var calls []struct {
|
||||
V uint64
|
||||
Uint64MoqParam types.Uint64
|
||||
}
|
||||
mock.lockShadowUint64.RLock()
|
||||
calls = mock.calls.ShadowUint64
|
||||
mock.lockShadowUint64.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowUint8 calls ShadowUint8Func.
|
||||
func (mock *ShadowTypesMock) ShadowUint8(v uint8, uint8MoqParam types.Uint8) {
|
||||
if mock.ShadowUint8Func == nil {
|
||||
panic("ShadowTypesMock.ShadowUint8Func: method is nil but ShadowTypes.ShadowUint8 was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V uint8
|
||||
Uint8MoqParam types.Uint8
|
||||
}{
|
||||
V: v,
|
||||
Uint8MoqParam: uint8MoqParam,
|
||||
}
|
||||
mock.lockShadowUint8.Lock()
|
||||
mock.calls.ShadowUint8 = append(mock.calls.ShadowUint8, callInfo)
|
||||
mock.lockShadowUint8.Unlock()
|
||||
mock.ShadowUint8Func(v, uint8MoqParam)
|
||||
}
|
||||
|
||||
// ShadowUint8Calls gets all the calls that were made to ShadowUint8.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowUint8Calls())
|
||||
func (mock *ShadowTypesMock) ShadowUint8Calls() []struct {
|
||||
V uint8
|
||||
Uint8MoqParam types.Uint8
|
||||
} {
|
||||
var calls []struct {
|
||||
V uint8
|
||||
Uint8MoqParam types.Uint8
|
||||
}
|
||||
mock.lockShadowUint8.RLock()
|
||||
calls = mock.calls.ShadowUint8
|
||||
mock.lockShadowUint8.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// ShadowUintptr calls ShadowUintptrFunc.
|
||||
func (mock *ShadowTypesMock) ShadowUintptr(v uintptr, uintptrMoqParam types.Uintptr) {
|
||||
if mock.ShadowUintptrFunc == nil {
|
||||
panic("ShadowTypesMock.ShadowUintptrFunc: method is nil but ShadowTypes.ShadowUintptr was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
V uintptr
|
||||
UintptrMoqParam types.Uintptr
|
||||
}{
|
||||
V: v,
|
||||
UintptrMoqParam: uintptrMoqParam,
|
||||
}
|
||||
mock.lockShadowUintptr.Lock()
|
||||
mock.calls.ShadowUintptr = append(mock.calls.ShadowUintptr, callInfo)
|
||||
mock.lockShadowUintptr.Unlock()
|
||||
mock.ShadowUintptrFunc(v, uintptrMoqParam)
|
||||
}
|
||||
|
||||
// ShadowUintptrCalls gets all the calls that were made to ShadowUintptr.
|
||||
// Check the length with:
|
||||
// len(mockedShadowTypes.ShadowUintptrCalls())
|
||||
func (mock *ShadowTypesMock) ShadowUintptrCalls() []struct {
|
||||
V uintptr
|
||||
UintptrMoqParam types.Uintptr
|
||||
} {
|
||||
var calls []struct {
|
||||
V uintptr
|
||||
UintptrMoqParam types.Uintptr
|
||||
}
|
||||
mock.lockShadowUintptr.RLock()
|
||||
calls = mock.calls.ShadowUintptr
|
||||
mock.lockShadowUintptr.RUnlock()
|
||||
return calls
|
||||
}
|
29
pkg/moq/testpackages/shadowtypes/types/types.go
Normal file
29
pkg/moq/testpackages/shadowtypes/types/types.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package types
|
||||
|
||||
type String string
|
||||
|
||||
type Int int
|
||||
type Int8 int8
|
||||
type Int16 int16
|
||||
type Int32 int32
|
||||
type Int64 int64
|
||||
|
||||
type Uint uint
|
||||
type Uint8 uint
|
||||
type Uint16 uint
|
||||
type Uint32 uint
|
||||
type Uint64 uint
|
||||
|
||||
type Float32 float32
|
||||
type Float64 float64
|
||||
|
||||
type Byte byte
|
||||
|
||||
type Rune rune
|
||||
|
||||
type Bool bool
|
||||
|
||||
type Complex64 complex64
|
||||
type Complex128 complex128
|
||||
|
||||
type Uintptr uintptr
|
@@ -1,5 +1,5 @@
|
||||
module github.com/matryer/moq/pkg/moq/testpackages/vendoring
|
||||
|
||||
go 1.14
|
||||
go 1.19
|
||||
|
||||
require github.com/sudo-suhas/moq-test-pkgs/somerepo v0.0.0-20200816045313-d2f573eea6c7
|
||||
|
@@ -26,3 +26,11 @@ Then:
|
||||
```bash
|
||||
GITHUB_TOKEN=xxx goreleaser --rm-dist
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
To test and verify changes to Go Releaser config, use the following:
|
||||
|
||||
```bash
|
||||
goreleaser --snapshot --skip-publish --rm-dist
|
||||
```
|
||||
|
3
renovate.json
Normal file
3
renovate.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||
}
|
Reference in New Issue
Block a user