From 1538422d276d191cc5fce4181d0d6350fa445ef7 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Fri, 13 Jan 2023 19:26:50 +0100 Subject: [PATCH] some cleanup --- bundle/schema/schema.go | 10 ---------- bundle/schema/schema_test.go | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/bundle/schema/schema.go b/bundle/schema/schema.go index dac7125ad..9ad03d83c 100644 --- a/bundle/schema/schema.go +++ b/bundle/schema/schema.go @@ -119,16 +119,6 @@ func safeToProperty(golangType reflect.Type, traceSet map[reflect.Type]struct{}, return props, nil } -func pop(q []reflect.StructField) reflect.StructField { - elem := q[0] - q = q[1:] - return elem -} - -func push(q []reflect.StructField, r reflect.StructField) { - q = append(q, r) -} - // travels anonymous embedded fields in a bfs manner to give us a list of all // member fields of a struct // simple Tree based traversal will take place because embbedded fields cannot diff --git a/bundle/schema/schema_test.go b/bundle/schema/schema_test.go index 93e6a8f60..f22f08679 100644 --- a/bundle/schema/schema_test.go +++ b/bundle/schema/schema_test.go @@ -266,7 +266,7 @@ func TestMapOfObjectsSchema(t *testing.T) { assert.Equal(t, expected, string(jsonSchema)) } -func TestEmbeddedSchema(t *testing.T) { +func TestEmbeddedStructSchema(t *testing.T) { type Person struct { Name string `json:"name"` Age int `json:"age,omitempty"` @@ -274,7 +274,7 @@ func TestEmbeddedSchema(t *testing.T) { type Location struct { Country string `json:"country"` - State string `json:"state,omitempty"` + State string `json:"state,omitempty"` } type Plot struct {