Add the #oid{} record to differentiate from a formatted hash
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
-module(geef_oid).
|
||||
|
||||
-include("geef_records.hlr").
|
||||
-export([parse/1, fmt/1]).
|
||||
|
||||
-spec fmt(binary()) -> binary().
|
||||
fmt(Oid) ->
|
||||
-spec fmt(oid()) -> binary().
|
||||
fmt(#oid{oid=Oid}) ->
|
||||
geef:oid_fmt(Oid).
|
||||
|
||||
|
||||
-spec parse(binary()) -> binary().
|
||||
-spec parse(binary()) -> oid().
|
||||
parse(Sha) ->
|
||||
geef:oid_parse(Sha).
|
||||
Oid = geef:oid_parse(Sha),
|
||||
#oid{oid=Oid}.
|
||||
|
||||
Reference in New Issue
Block a user