From c097d10306adbfe06691d1573219d0b91e14401d Mon Sep 17 00:00:00 2001 From: Harald Nordgren Date: Sun, 28 Jul 2024 21:15:08 +0200 Subject: [PATCH] Update types.go --- .../testpackages/shadowtypes/types/types.go | 19 +++++++++++++++++++ pkg/moq/testpackages/syncimport/sync/thing.go | 1 + pkg/moq/testpackages/syncimport/syncer.go | 1 + .../testpackages/transientimport/base/type.go | 1 + .../transientimport/four/app/v1/four.go | 1 + .../transientimport/one/v1/one.go | 1 + .../transientimport/onev1/zero.go | 1 + .../transientimport/three/v1/three.go | 1 + .../testpackages/transientimport/transient.go | 1 + .../transientimport/two/app/v1/two.go | 1 + pkg/moq/testpackages/variadic/echoer.go | 1 + .../sudo-suhas/moq-test-pkgs/somerepo/code.go | 1 + .../sudo-suhas/moq-test-pkgs/somerepo/code.go | 1 + 13 files changed, 31 insertions(+) diff --git a/pkg/moq/testpackages/shadowtypes/types/types.go b/pkg/moq/testpackages/shadowtypes/types/types.go index 66c552e..5d59446 100644 --- a/pkg/moq/testpackages/shadowtypes/types/types.go +++ b/pkg/moq/testpackages/shadowtypes/types/types.go @@ -1,29 +1,48 @@ package types +// String is a test type. type String string +// Int is a test type. type Int int +// Int8 is a test type. type Int8 int8 +// Int16 is a test type. type Int16 int16 +// Int32 is a test type. type Int32 int32 +// Int64 is a test type. type Int64 int64 +// Uint is a test type. type Uint uint +// Uint8 is a test type. type Uint8 uint +// Uint16 is a test type. type Uint16 uint +// Uint32 is a test type. type Uint32 uint +// Uint64 is a test type. type Uint64 uint +// Float32 is a test type. type Float32 float32 +// Float64 is a test type. type Float64 float64 +// Byte is a test type. type Byte byte +// Rune is a test type. type Rune rune +// Bool is a test type. type Bool bool +// Complex64 is a test type. type Complex64 complex64 +// Complex128 is a test type. type Complex128 complex128 +// Uintptr is a test type. type Uintptr uintptr diff --git a/pkg/moq/testpackages/syncimport/sync/thing.go b/pkg/moq/testpackages/syncimport/sync/thing.go index 5af77a9..f44f8fd 100644 --- a/pkg/moq/testpackages/syncimport/sync/thing.go +++ b/pkg/moq/testpackages/syncimport/sync/thing.go @@ -1,3 +1,4 @@ package sync +// Thing is a test type. type Thing string diff --git a/pkg/moq/testpackages/syncimport/syncer.go b/pkg/moq/testpackages/syncimport/syncer.go index 5094284..9ac5464 100644 --- a/pkg/moq/testpackages/syncimport/syncer.go +++ b/pkg/moq/testpackages/syncimport/syncer.go @@ -6,6 +6,7 @@ import ( "github.com/matryer/moq/pkg/moq/testpackages/syncimport/sync" ) +// Syncer is a test interface. type Syncer interface { Blah(s sync.Thing, wg *stdsync.WaitGroup) } diff --git a/pkg/moq/testpackages/transientimport/base/type.go b/pkg/moq/testpackages/transientimport/base/type.go index f099285..e51c445 100644 --- a/pkg/moq/testpackages/transientimport/base/type.go +++ b/pkg/moq/testpackages/transientimport/base/type.go @@ -8,6 +8,7 @@ import ( two "github.com/matryer/moq/pkg/moq/testpackages/transientimport/two/app/v1" ) +// Transient is a test interface. type Transient interface { DoSomething(onev1.Zero, one.One, two.Two, three.Three, four.Four) } diff --git a/pkg/moq/testpackages/transientimport/four/app/v1/four.go b/pkg/moq/testpackages/transientimport/four/app/v1/four.go index ba02f3a..3661286 100644 --- a/pkg/moq/testpackages/transientimport/four/app/v1/four.go +++ b/pkg/moq/testpackages/transientimport/four/app/v1/four.go @@ -1,3 +1,4 @@ package v1 +// Four is a test type. type Four string diff --git a/pkg/moq/testpackages/transientimport/one/v1/one.go b/pkg/moq/testpackages/transientimport/one/v1/one.go index 0608265..2cef63b 100644 --- a/pkg/moq/testpackages/transientimport/one/v1/one.go +++ b/pkg/moq/testpackages/transientimport/one/v1/one.go @@ -1,3 +1,4 @@ package v1 +// One is a test type. type One string diff --git a/pkg/moq/testpackages/transientimport/onev1/zero.go b/pkg/moq/testpackages/transientimport/onev1/zero.go index fd94c32..35260d0 100644 --- a/pkg/moq/testpackages/transientimport/onev1/zero.go +++ b/pkg/moq/testpackages/transientimport/onev1/zero.go @@ -1,3 +1,4 @@ package onev1 +// Zero is a test type. type Zero string diff --git a/pkg/moq/testpackages/transientimport/three/v1/three.go b/pkg/moq/testpackages/transientimport/three/v1/three.go index 3287196..dd48e9b 100644 --- a/pkg/moq/testpackages/transientimport/three/v1/three.go +++ b/pkg/moq/testpackages/transientimport/three/v1/three.go @@ -1,3 +1,4 @@ package v1 +// Three is a test type. type Three string diff --git a/pkg/moq/testpackages/transientimport/transient.go b/pkg/moq/testpackages/transientimport/transient.go index 854d637..7cb6fb2 100644 --- a/pkg/moq/testpackages/transientimport/transient.go +++ b/pkg/moq/testpackages/transientimport/transient.go @@ -4,4 +4,5 @@ import ( "github.com/matryer/moq/pkg/moq/testpackages/transientimport/base" ) +// Transient is a test interface. type Transient = base.Transient diff --git a/pkg/moq/testpackages/transientimport/two/app/v1/two.go b/pkg/moq/testpackages/transientimport/two/app/v1/two.go index 6e0f040..cc06174 100644 --- a/pkg/moq/testpackages/transientimport/two/app/v1/two.go +++ b/pkg/moq/testpackages/transientimport/two/app/v1/two.go @@ -1,3 +1,4 @@ package v1 +// Two is a test type. type Two string diff --git a/pkg/moq/testpackages/variadic/echoer.go b/pkg/moq/testpackages/variadic/echoer.go index b830b65..7205984 100644 --- a/pkg/moq/testpackages/variadic/echoer.go +++ b/pkg/moq/testpackages/variadic/echoer.go @@ -1,5 +1,6 @@ package variadic +// Echoer is an interface. type Echoer interface { Echo(ss ...string) []string } diff --git a/pkg/moq/testpackages/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go b/pkg/moq/testpackages/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go index d5fbd14..658df75 100644 --- a/pkg/moq/testpackages/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go +++ b/pkg/moq/testpackages/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go @@ -8,6 +8,7 @@ type SomeType struct { Truth bool } +// SomeService is a test interface. type SomeService interface { Get() SomeType } diff --git a/pkg/moq/testpackages/vendoring/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go b/pkg/moq/testpackages/vendoring/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go index d5fbd14..658df75 100644 --- a/pkg/moq/testpackages/vendoring/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go +++ b/pkg/moq/testpackages/vendoring/vendor/github.com/sudo-suhas/moq-test-pkgs/somerepo/code.go @@ -8,6 +8,7 @@ type SomeType struct { Truth bool } +// SomeService is a test interface. type SomeService interface { Get() SomeType }