ollama/types/model
Blake Mizerany 4dc4f1be34
types/model: restrict digest hash part to a minimum of 2 characters (#3858)
This allows users of a valid Digest to know it has a minimum of 2
characters in the hash part for use when sharding.

This is a reasonable restriction as the hash part is a SHA256 hash which
is 64 characters long, which is the common hash used. There is no
anticipation of using a hash with less than 2 characters.

Also, add MustParseDigest.

Also, replace Digest.Type with Digest.Split for getting both the type
and hash parts together, which is most the common case when asking for
either.
2024-04-23 18:24:17 -07:00
..
testdata/fuzz/FuzzParseRef types/model: init with Name and Digest types (#3541) 2024-04-10 16:30:05 -07:00
digest.go types/model: restrict digest hash part to a minimum of 2 characters (#3858) 2024-04-23 18:24:17 -07:00
digest_test.go types/model: init with Name and Digest types (#3541) 2024-04-10 16:30:05 -07:00
name.go types/model: restrict digest hash part to a minimum of 2 characters (#3858) 2024-04-23 18:24:17 -07:00
name_test.go types/model: restrict digest hash part to a minimum of 2 characters (#3858) 2024-04-23 18:24:17 -07:00