diff --git a/comid/classid.go b/comid/classid.go index 706e1f8d..1d69f605 100644 --- a/comid/classid.go +++ b/comid/classid.go @@ -16,7 +16,7 @@ import ( ) // ClassID identifies the environment via a well-known identifier. This can be -// an OID, a UUID, a variable length opaque bytes or a profile-defined extension type. +// an OID, a UUID, variable-length opaque bytes or a profile-defined extension type. type ClassID struct { Value IClassIDValue } diff --git a/comid/group.go b/comid/group.go index 0678fb5e..c909a36f 100644 --- a/comid/group.go +++ b/comid/group.go @@ -12,7 +12,7 @@ import ( "github.com/veraison/corim/extensions" ) -// Group stores a group identity. The supported format is UUID and a variable length opaque bytes. +// Group stores a group identity. The supported formats are UUID and variable-length opaque bytes. type Group struct { Value IGroupValue } @@ -82,7 +82,7 @@ func (o *Group) UnmarshalCBOR(data []byte) error { // // { // "type": "bytes", -// "value": "69E027B2-7157-4758-BCB4-D9F167FE49EA" +// "value": "MTIzNDU2Nzg5" // } func (o *Group) UnmarshalJSON(data []byte) error { var tnv encoding.TypeAndValue diff --git a/comid/group_test.go b/comid/group_test.go index 59c1f03c..91c19596 100644 --- a/comid/group_test.go +++ b/comid/group_test.go @@ -140,7 +140,6 @@ func TestGroup_MarshalJSONBytes_OK(t *testing.T) { jsonBytes, err := tv.MarshalJSON() require.NoError(t, err) assert.Equal(t, `{"type":"bytes","value":"AQID"}`, string(jsonBytes)) - } func TestGroup_UnmarshalJSON_Bytes_OK(t *testing.T) { diff --git a/comid/instance.go b/comid/instance.go index 39c40b98..8d51bd9c 100644 --- a/comid/instance.go +++ b/comid/instance.go @@ -8,7 +8,7 @@ import ( "github.com/veraison/corim/extensions" ) -// Instance stores an instance identity. The supported formats are UUID, UEID and variable length opaque bytes. +// Instance stores an instance identity. The supported formats are UUID, UEID and variable-length opaque bytes. type Instance struct { Value IInstanceValue } @@ -77,7 +77,7 @@ func (o *Instance) UnmarshalCBOR(data []byte) error { // // ueid: base64-encoded bytes, e.g. "YWNtZS1pbXBsZW1lbnRhdGlvbi1pZC0wMDAwMDAwMDE=" // uuid: standard UUID string representation, e.g. "550e8400-e29b-41d4-a716-446655440000" -// bytes: a variable length opaque bytes, example {0x07, 0x12, 0x34} +// bytes: a variable-length opaque byte string, example {0x07, 0x12, 0x34} func (o *Instance) UnmarshalJSON(data []byte) error { var tnv encoding.TypeAndValue diff --git a/comid/instance_test.go b/comid/instance_test.go index 3b81d4df..4907f128 100644 --- a/comid/instance_test.go +++ b/comid/instance_test.go @@ -90,7 +90,6 @@ func Test_NewBytesInstance_NOK(t *testing.T) { Input any Err string }{ - { Name: "invalid input integer", Input: 7,