fix2
This commit is contained in:
parent
b68755771b
commit
c19637df51
46 changed files with 103 additions and 103 deletions
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module git.kmsign.com/royalcat/repogen
|
module git.kmsign.ru/royalcat/repogen
|
||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package code_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ErrorTestCase struct {
|
type ErrorTestCase struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TestCase struct {
|
type TestCase struct {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStructFieldsByName(t *testing.T) {
|
func TestStructFieldsByName(t *testing.T) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
const goImplFile1Data = `
|
const goImplFile1Data = `
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
const baseTemplate = `// Code generated by {{.Program}}. DO NOT EDIT.
|
const baseTemplate = `// Code generated by {{.Program}}. DO NOT EDIT.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FunctionBody []Statement
|
type FunctionBody []Statement
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIdentifier(t *testing.T) {
|
func TestIdentifier(t *testing.T) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"golang.org/x/tools/imports"
|
"golang.org/x/tools/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ package codegen_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const expectedBuildCode = `// Code generated by repogen. DO NOT EDIT.
|
const expectedBuildCode = `// Code generated by repogen. DO NOT EDIT.
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
const functionTemplate = `
|
const functionTemplate = `
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFunctionBuilderBuild_NoReturn(t *testing.T) {
|
func TestFunctionBuilderBuild_NoReturn(t *testing.T) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
const methodTemplate = `
|
const methodTemplate = `
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMethodBuilderBuild_IgnoreReceiverNoReturn(t *testing.T) {
|
func TestMethodBuilderBuild_IgnoreReceiverNoReturn(t *testing.T) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
const structTemplate = `
|
const structTemplate = `
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const expectedStructBuilderCode = `
|
const expectedStructBuilderCode = `
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package generator
|
package generator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenerateRepository generates repository implementation code from repository
|
// GenerateRepository generates repository implementation code from repository
|
||||||
|
|
|
@ -4,10 +4,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/generator"
|
"git.kmsign.ru/royalcat/repogen/internal/generator"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -3,9 +3,9 @@ package mongo
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errOccurred = codegen.RawStatement("err != nil")
|
var errOccurred = codegen.RawStatement("err != nil")
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package mongo
|
package mongo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (g RepositoryGenerator) generateCountBody(
|
func (g RepositoryGenerator) generateCountBody(
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateMethod_Count(t *testing.T) {
|
func TestGenerateMethod_Count(t *testing.T) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package mongo
|
package mongo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (g RepositoryGenerator) generateDeleteBody(
|
func (g RepositoryGenerator) generateDeleteBody(
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateMethod_Delete(t *testing.T) {
|
func TestGenerateMethod_Delete(t *testing.T) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package mongo
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewOperationNotSupportedError creates operationNotSupportedError
|
// NewOperationNotSupportedError creates operationNotSupportedError
|
||||||
|
|
|
@ -3,8 +3,8 @@ package mongo_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ErrorTestCase struct {
|
type ErrorTestCase struct {
|
||||||
|
|
|
@ -3,9 +3,9 @@ package mongo
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (g RepositoryGenerator) generateFindBody(
|
func (g RepositoryGenerator) generateFindBody(
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateMethod_Find(t *testing.T) {
|
func TestGenerateMethod_Find(t *testing.T) {
|
||||||
|
|
|
@ -3,9 +3,9 @@ package mongo
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewGenerator creates a new instance of MongoDB repository generator
|
// NewGenerator creates a new instance of MongoDB repository generator
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package mongo
|
package mongo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (g RepositoryGenerator) generateInsertBody(
|
func (g RepositoryGenerator) generateInsertBody(
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateMethod_Insert(t *testing.T) {
|
func TestGenerateMethod_Insert(t *testing.T) {
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type updateField struct {
|
type updateField struct {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package mongo
|
package mongo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (g RepositoryGenerator) generateUpdateBody(
|
func (g RepositoryGenerator) generateUpdateBody(
|
||||||
|
|
|
@ -5,11 +5,11 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/codegen"
|
"git.kmsign.ru/royalcat/repogen/internal/codegen"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/mongo"
|
"git.kmsign.ru/royalcat/repogen/internal/mongo"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenerateMethod_Update(t *testing.T) {
|
func TestGenerateMethod_Update(t *testing.T) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
// parsing error constants
|
// parsing error constants
|
||||||
|
|
|
@ -3,8 +3,8 @@ package spec_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ErrorTestCase struct {
|
type ErrorTestCase struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package spec
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FieldReference is a reference path to access to the field
|
// FieldReference is a reference path to access to the field
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package spec
|
package spec
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryMode one or many
|
// QueryMode one or many
|
||||||
|
|
|
@ -3,7 +3,7 @@ package spec_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type OperationTestCase struct {
|
type OperationTestCase struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package spec
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"github.com/fatih/camelcase"
|
"github.com/fatih/camelcase"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package spec
|
package spec
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QuerySpec is a set of conditions of querying the database
|
// QuerySpec is a set of conditions of querying the database
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package spec
|
package spec
|
||||||
|
|
||||||
import "git.kmsign.com/royalcat/repogen/internal/code"
|
import "git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
|
|
||||||
// UpdateOperation is a method specification for update operations
|
// UpdateOperation is a method specification for update operations
|
||||||
type UpdateOperation struct {
|
type UpdateOperation struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package spec_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UpdateTypeTestCase struct {
|
type UpdateTypeTestCase struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package testutils_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/testutils"
|
"git.kmsign.ru/royalcat/repogen/internal/testutils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestExpectMultiLineString(t *testing.T) {
|
func TestExpectMultiLineString(t *testing.T) {
|
||||||
|
|
8
main.go
8
main.go
|
@ -10,14 +10,14 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"git.kmsign.com/royalcat/repogen/internal/code"
|
"git.kmsign.ru/royalcat/repogen/internal/code"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/generator"
|
"git.kmsign.ru/royalcat/repogen/internal/generator"
|
||||||
"git.kmsign.com/royalcat/repogen/internal/spec"
|
"git.kmsign.ru/royalcat/repogen/internal/spec"
|
||||||
)
|
)
|
||||||
|
|
||||||
const usageText = `repogen generates MongoDB repository implementation from repository interface
|
const usageText = `repogen generates MongoDB repository implementation from repository interface
|
||||||
|
|
||||||
Find more information at: https://git.kmsign.com/royalcat/repogen
|
Find more information at: https://git.kmsign.ru/royalcat/repogen
|
||||||
|
|
||||||
Supported options:`
|
Supported options:`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue