mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-09-06 21:21:36 +02:00
stop supporting prefix matches.
This commit is contained in:
9
utils.go
9
utils.go
@@ -28,15 +28,6 @@ func similar[E constraints.Ordered](as, bs []E) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func containsPrefixOf(haystack []string, needle string) bool {
|
||||
for _, hay := range haystack {
|
||||
if strings.HasPrefix(needle, hay) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Escaping strings for JSON encoding according to RFC8259.
|
||||
// Also encloses result in quotation marks "".
|
||||
func escapeString(dst []byte, s string) []byte {
|
||||
|
Reference in New Issue
Block a user