Skip to content

Commit

Permalink
Update module name (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
efritz committed Mar 4, 2024
1 parent 94a3781 commit 3320583
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 38 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@

Nothing yet!

## [v2.0.0] - 2024-03-04
## [v2.0.1] - 2024-03-04

- Changed name of module to `github.com/derision-test/go-mockgen/v2`.
- Updated module to Go 1.22. [#52](https://github.com/derision-test/go-mockgen/pull/52)

## v2.0.0 - 2024-03-04

**PULLED**, as module name was not updated properly.

## [v1.3.7] - 2022-11-11

- Fixed import cycle generated by generic param referencing local type. [#39](https://github.com/derision-test/go-mockgen/pull/39)
Expand Down Expand Up @@ -114,3 +119,4 @@ No significant changes (only corrected version output).
[v1.3.5]: https://github.com/derision-test/go-mockgen/compare/v1.3.4...v1.3.5
[v1.3.6]: https://github.com/derision-test/go-mockgen/compare/v1.3.5...v1.3.6
[v1.3.7]: https://github.com/derision-test/go-mockgen/compare/v1.3.6...v1.3.7
[v2.0.1]: https://github.com/derision-test/go-mockgen/compare/v1.3.7...v2.0.1
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ To use the assertions, import the assert and require packages by name.

```go
import (
mockassert "github.com/derision-test/go-mockgen/testutil/assert"
mockrequire "github.com/derision-test/go-mockgen/testutil/require"
mockassert "github.com/derision-test/go-mockgen/v2/testutil/assert"
mockrequire "github.com/derision-test/go-mockgen/v2/testutil/require"
)
```

Expand Down Expand Up @@ -210,7 +210,7 @@ This library also contains a set of [Gomega](https://onsi.github.io/gomega/) mat
To use the matchers, import the matchers package anonymously.

```go
import . "github.com/derision-test/go-mockgen/testutil/gomega"
import . "github.com/derision-test/go-mockgen/v2/testutil/gomega"
```

The following matchers are defined.
Expand Down
6 changes: 3 additions & 3 deletions cmd/go-mockgen/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"strings"

"github.com/alecthomas/kingpin"
"github.com/derision-test/go-mockgen/internal/mockgen/consts"
"github.com/derision-test/go-mockgen/internal/mockgen/generation"
"github.com/derision-test/go-mockgen/internal/mockgen/paths"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/consts"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/generation"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/paths"
"gopkg.in/yaml.v3"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/go-mockgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"log"
"strings"

"github.com/derision-test/go-mockgen/internal/mockgen/generation"
"github.com/derision-test/go-mockgen/internal/mockgen/types"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/generation"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/types"
"golang.org/x/tools/go/packages"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/derision-test/go-mockgen
module github.com/derision-test/go-mockgen/v2

go 1.22

Expand Down
6 changes: 3 additions & 3 deletions internal/integration/gomega_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"testing"

"github.com/derision-test/go-mockgen/internal/integration/testdata"
"github.com/derision-test/go-mockgen/internal/integration/testdata/mocks"
. "github.com/derision-test/go-mockgen/testutil/gomega"
"github.com/derision-test/go-mockgen/v2/internal/integration/testdata"
"github.com/derision-test/go-mockgen/v2/internal/integration/testdata/mocks"
. "github.com/derision-test/go-mockgen/v2/testutil/gomega"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/integration/strict_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/derision-test/go-mockgen/internal/integration/testdata/mocks"
"github.com/derision-test/go-mockgen/v2/internal/integration/testdata/mocks"
"github.com/stretchr/testify/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions internal/integration/testify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strings"
"testing"

"github.com/derision-test/go-mockgen/internal/integration/testdata"
"github.com/derision-test/go-mockgen/internal/integration/testdata/mocks"
mockassert "github.com/derision-test/go-mockgen/testutil/assert"
"github.com/derision-test/go-mockgen/v2/internal/integration/testdata"
"github.com/derision-test/go-mockgen/v2/internal/integration/testdata/mocks"
mockassert "github.com/derision-test/go-mockgen/v2/testutil/assert"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/mockgen/consts/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package consts

const (
Name = "go-mockgen"
PackageName = "github.com/derision-test/go-mockgen"
PackageName = "github.com/derision-test/go-mockgen/v2"
Description = "go-mockgen generates mock implementations from interface definitions."
Version = "1.3.7"
)
6 changes: 3 additions & 3 deletions internal/mockgen/generation/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"strings"

"github.com/dave/jennifer/jen"
"github.com/derision-test/go-mockgen/internal/mockgen/consts"
"github.com/derision-test/go-mockgen/internal/mockgen/paths"
"github.com/derision-test/go-mockgen/internal/mockgen/types"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/consts"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/paths"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/types"
)

type Options struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/mockgen/generation/generate_constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"unicode"

"github.com/dave/jennifer/jen"
"github.com/derision-test/go-mockgen/internal/mockgen/types"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/types"
)

func generateMockStructConstructor(iface *wrappedInterface, constructorPrefix, outputImportPath string) jen.Code {
Expand Down
4 changes: 2 additions & 2 deletions internal/mockgen/generation/generate_constructors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func TestGenerateMockStructFromConstructorUnexported(t *testing.T) {

expected := strip(`
// surrogateMockClient is a copy of the client interface (from the package
// github.com/derision-test/go-mockgen/test). It is redefined here as it is
// unexported in the source package.
// github.com/derision-test/go-mockgen/v2/test). It is redefined here as it
// is unexported in the source package.
type surrogateMockClient interface {
Status() (string, bool)
Do(string) bool
Expand Down
2 changes: 1 addition & 1 deletion internal/mockgen/generation/generate_structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"

"github.com/dave/jennifer/jen"
"github.com/derision-test/go-mockgen/internal/mockgen/types"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/types"
"github.com/dustin/go-humanize"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/mockgen/generation/generate_structs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ func TestGenerateMockStruct(t *testing.T) {
code := generateMockStruct(makeInterface(TestMethodStatus, TestMethodDo, TestMethodDof), "")
expected := strip(`
// MockTestClient is a mock implementation of the Client interface (from the
// package github.com/derision-test/go-mockgen/test) used for unit testing.
// package github.com/derision-test/go-mockgen/v2/test) used for unit
// testing.
type MockTestClient struct {
// StatusFunc is an instance of a mock function object controlling the
// behavior of the method Status.
Expand Down
4 changes: 2 additions & 2 deletions internal/mockgen/generation/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
gotypes "go/types"
"strings"

"github.com/derision-test/go-mockgen/internal/mockgen/types"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/types"
)

const (
TestPrefix = "Test"
TestTitleName = "Client"
TestMockStructName = "MockTestClient"
TestImportPath = "github.com/derision-test/go-mockgen/test"
TestImportPath = "github.com/derision-test/go-mockgen/v2/test"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/mockgen/generation/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package generation

import (
"github.com/dave/jennifer/jen"
"github.com/derision-test/go-mockgen/internal/mockgen/types"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/types"
)

func compose(stmt *jen.Statement, tail ...jen.Code) *jen.Statement {
Expand Down
2 changes: 1 addition & 1 deletion internal/mockgen/generation/wrapped_interface.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package generation

import "github.com/derision-test/go-mockgen/internal/mockgen/types"
import "github.com/derision-test/go-mockgen/v2/internal/mockgen/types"

type wrappedInterface struct {
*types.Interface
Expand Down
2 changes: 1 addition & 1 deletion internal/mockgen/generation/wrapped_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package generation

import (
"github.com/dave/jennifer/jen"
"github.com/derision-test/go-mockgen/internal/mockgen/types"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/types"
)

type wrappedMethod struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/mockgen/types/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"unicode"

"github.com/derision-test/go-mockgen/internal/mockgen/paths"
"github.com/derision-test/go-mockgen/v2/internal/mockgen/paths"
"golang.org/x/tools/go/packages"
)

Expand Down
2 changes: 1 addition & 1 deletion testutil/assert/asserter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mockassert
import (
"reflect"

"github.com/derision-test/go-mockgen/internal/testutil"
"github.com/derision-test/go-mockgen/v2/internal/testutil"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion testutil/assert/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mockassert
import (
"fmt"

"github.com/derision-test/go-mockgen/internal/testutil"
"github.com/derision-test/go-mockgen/v2/internal/testutil"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion testutil/gomega/called_matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package matchers
import (
"fmt"

"github.com/derision-test/go-mockgen/internal/testutil"
"github.com/derision-test/go-mockgen/v2/internal/testutil"
"github.com/onsi/gomega/format"
"github.com/onsi/gomega/types"
)
Expand Down
2 changes: 1 addition & 1 deletion testutil/gomega/called_with_matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package matchers
import (
"fmt"

"github.com/derision-test/go-mockgen/internal/testutil"
"github.com/derision-test/go-mockgen/v2/internal/testutil"
"github.com/onsi/gomega/format"
"github.com/onsi/gomega/matchers"
"github.com/onsi/gomega/types"
Expand Down
2 changes: 1 addition & 1 deletion testutil/require/asserter.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package mockrequire

import mockassert "github.com/derision-test/go-mockgen/testutil/assert"
import mockassert "github.com/derision-test/go-mockgen/v2/testutil/assert"

type CallInstanceAsserter = mockassert.CallInstanceAsserter
type CallInstanceAsserterFunc = mockassert.CallInstanceAsserterFunc
Expand Down
2 changes: 1 addition & 1 deletion testutil/require/require.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mockrequire

import (
mockassert "github.com/derision-test/go-mockgen/testutil/assert"
mockassert "github.com/derision-test/go-mockgen/v2/testutil/assert"
"github.com/stretchr/testify/require"
)

Expand Down

0 comments on commit 3320583

Please sign in to comment.