Add the ability to fully customize jet generated files.

This commit is contained in:
go-jet 2021-07-27 17:39:21 +02:00
parent caa81930dc
commit 8864667f47
40 changed files with 2274 additions and 882 deletions

View file

@ -5,7 +5,7 @@ import (
"encoding/json"
"fmt"
"github.com/go-jet/jet/v2/internal/jet"
"github.com/go-jet/jet/v2/internal/utils"
"github.com/go-jet/jet/v2/internal/utils/throw"
"github.com/go-jet/jet/v2/qrm"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
@ -66,7 +66,7 @@ func SaveJSONFile(v interface{}, testRelativePath string) {
filePath := getFullPath(testRelativePath)
err := ioutil.WriteFile(filePath, jsonText, 0644)
utils.PanicOnError(err)
throw.OnError(err)
}
// AssertJSONFile check if data json representation is the same as json at testRelativePath