cleanup
- removing test main - adding files to gitignore to prevent future pushes
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -15,13 +15,7 @@
|
|||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
|
||||||
# vendor/
|
|
||||||
|
|
||||||
# Go workspace file
|
|
||||||
go.work
|
|
||||||
go.work.sum
|
|
||||||
|
|
||||||
# env file
|
# env file
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
cmd/*
|
||||||
46
cmd/main.go
46
cmd/main.go
@@ -1,46 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"code.jakeyoungdev.com/go/lazy"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
|
|
||||||
type Test struct {
|
|
||||||
Timer sql.NullTime `db:"timer"`
|
|
||||||
TestTime time.Time `db:"times"`
|
|
||||||
}
|
|
||||||
// res, err := lazy.RandomStruct(lazy.StructConfig{
|
|
||||||
// Query: "insert into test (one, two) values (?, ?), (?, ?)",
|
|
||||||
// Example: test{},
|
|
||||||
// RowCount: 2,
|
|
||||||
// })
|
|
||||||
|
|
||||||
x, y := lazy.RandomGenerate(lazy.Config{
|
|
||||||
Query: "select * from table",
|
|
||||||
Example: Test{},
|
|
||||||
RowCount: 1,
|
|
||||||
})
|
|
||||||
if y != nil {
|
|
||||||
panic(y)
|
|
||||||
}
|
|
||||||
fmt.Printf("%+v", x)
|
|
||||||
|
|
||||||
// if err != nil {
|
|
||||||
// panic(err)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// fmt.Println(res)
|
|
||||||
|
|
||||||
// t, ok := res.MockStructs[0].(test)
|
|
||||||
// if !ok {
|
|
||||||
// fmt.Println("errrrrrr")
|
|
||||||
// }
|
|
||||||
|
|
||||||
// fmt.Println(t.One)
|
|
||||||
// fmt.Println(t.Two)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user