Skip to content

Commit

Permalink
Add GetUUID Method
Browse files Browse the repository at this point in the history
Signed-off-by: Yogesh Deshpande <[email protected]>
  • Loading branch information
yogeshbdeshpande committed Dec 1, 2023
1 parent eeb7bd4 commit c98741c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions comid/classid.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ func (o ClassID) GetImplID() (ImplID, error) {
}
}

func (o ClassID) GetUUID() (UUID, error) {
switch t := o.val.(type) {
case TaggedUUID:
return UUID(t), nil
default:
return UUID{}, fmt.Errorf("class-id type is: %T", t)
}

}

// SetOID sets the value of the targed ClassID to the supplied OID.
// The OID is a string in dotted-decimal notation
func (o *ClassID) SetOID(s string) *ClassID {
Expand Down

0 comments on commit c98741c

Please sign in to comment.