As commented on PR #16 I've made the following changes:
merge the scalar value fields switch to fieldToDataSchema
split unit test for fieldToDataSchema() for each normal field type
move the test file so that they will be tested by cmd/prototd/main_test.go
remove the manual JSON (un)marshaller helpers
Notice that the cmd/prototd/test/scalar-value-fields/output.jsonld file makes the current test to be failing, because there's no RPC function is in the test input (should be fixed after the other feature is implemented).
As commented on PR #16 I've made the following changes:
fieldToDataSchema
fieldToDataSchema()
for each normal field typecmd/prototd/main_test.go
Notice that the
cmd/prototd/test/scalar-value-fields/output.jsonld
file makes the current test to be failing, because there's no RPC function is in the test input (should be fixed after the other feature is implemented).