struct name revert
This commit is contained in:
6
lazy.go
6
lazy.go
@@ -32,7 +32,7 @@ type RowMock struct {
|
||||
}
|
||||
|
||||
// configuration for RandomGenerate
|
||||
type RowConfig struct {
|
||||
type Config struct {
|
||||
Query string
|
||||
Example any
|
||||
Keys []any
|
||||
@@ -47,7 +47,7 @@ type StructMock struct {
|
||||
}
|
||||
|
||||
// generates mock data based on configuration to be used for sqlmock
|
||||
func RandomRows(m RowConfig) (*RowMock, error) {
|
||||
func RandomRows(m Config) (*RowMock, error) {
|
||||
//example struct cannot be nil and must be a struct
|
||||
if m.Example == nil {
|
||||
return nil, ErrBadExample
|
||||
@@ -113,7 +113,7 @@ func RandomRows(m RowConfig) (*RowMock, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func RandomStruct(c RowConfig) (*StructMock, error) {
|
||||
func RandomStruct(c Config) (*StructMock, error) {
|
||||
if c.Example == nil {
|
||||
return nil, ErrBadExample
|
||||
}
|
||||
|
Reference in New Issue
Block a user