Add ability to change alias of all projections in the ProjectionList.

Add ability to exclude list of columns from ProjectionList.
This commit is contained in:
go-jet 2022-01-05 18:00:20 +01:00
parent 392ba63bc5
commit 5cbf4aac86
8 changed files with 377 additions and 31 deletions

View file

@ -56,6 +56,12 @@ func PrintJson(v interface{}) {
fmt.Println(string(jsonText))
}
// ToJSON converts v into json string
func ToJSON(v interface{}) string {
jsonText, _ := json.MarshalIndent(v, "", "\t")
return string(jsonText)
}
// AssertJSON check if data json output is the same as expectedJSON
func AssertJSON(t *testing.T, data interface{}, expectedJSON string) {
jsonData, err := json.MarshalIndent(data, "", "\t")