From 36340918040627d93808c09dea8d9bd7b7457f82 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 24 May 2026 11:07:16 +0000 Subject: object/id: Rename algorithm to object format --- object/id/object_format_parse.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 object/id/object_format_parse.go (limited to 'object/id/object_format_parse.go') 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 +} -- cgit v1.3.1-10-gc9f91