hashText creates a stable, Unicode-safe key from text content
(text string)
| 59 | |
| 60 | // hashText creates a stable, Unicode-safe key from text content |
| 61 | func hashText(text string) string { |
| 62 | h := sha256.Sum256([]byte(text)) |
| 63 | return hex.EncodeToString(h[:])[:SignatureTextHashLen] |
| 64 | } |
| 65 | |
| 66 | // getOrCreateGroupCache gets or creates a cache bucket for a model group |
| 67 | func getOrCreateGroupCache(groupKey string) *groupCache { |
no outgoing calls
no test coverage detected