Skip to content

Commit

Permalink
Introduce review comments- Part 1
Browse files Browse the repository at this point in the history
Signed-off-by: Yogesh Deshpande <[email protected]>
  • Loading branch information
yogeshbdeshpande committed Jan 23, 2024
1 parent 4c5ad70 commit 9060081
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion comid/classid.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions comid/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion comid/group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions comid/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion comid/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func Test_NewBytesInstance_NOK(t *testing.T) {
Input any
Err string
}{

{
Name: "invalid input integer",
Input: 7,
Expand Down

0 comments on commit 9060081

Please sign in to comment.