MCPcopy Create free account
hub / github.com/nikivdev/go / isLikelyHash

Function isLikelyHash

cli/spec/main.go:625–643  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

623}
624
625func isLikelyHash(value string) bool {
626 if value == "" {
627 return false
628 }
629 if len(value) < 8 || len(value) > 128 {
630 return false
631 }
632 for _, r := range value {
633 switch {
634 case r >= 'a' && r <= 'z':
635 case r >= 'A' && r <= 'Z':
636 case r >= '0' && r <= '9':
637 case r == '-' || r == '_':
638 default:
639 return false
640 }
641 }
642 return true
643}
644
645func fetchReviewComments(apiOrigin, hash string) ([]feedbackRecord, error) {
646 origin := strings.TrimRight(strings.TrimSpace(apiOrigin), "/")

Callers 1

normalizeHashSelectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected