diff options
| author | 2026-05-24 11:07:16 +0000 | |
|---|---|---|
| committer | 2026-05-24 11:09:59 +0000 | |
| commit | 36340918040627d93808c09dea8d9bd7b7457f82 (patch) | |
| tree | dab5fa0edbf2f2bf315d1fda73c0f7ac5c8fc6d9 /object/id/object_format_parse.go | |
| parent | internal/testgit: Add Algorithm method (diff) | |
| signature | No signature | |
object/id: Rename algorithm to object format
Diffstat (limited to 'object/id/object_format_parse.go')
| -rw-r--r-- | object/id/object_format_parse.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/object/id/object_format_parse.go b/object/id/object_format_parse.go new file mode 100644 index 00000000..9e7401c7 --- /dev/null +++ b/object/id/object_format_parse.go @@ -0,0 +1,8 @@ +package id + +// ParseObjectFormat parses a canonical object format name (e.g. "sha1", "sha256"). +func ParseObjectFormat(s string) (ObjectFormat, bool) { + objectFormat, ok := objectFormatByName[s] + + return objectFormat, ok +} |
