From d8b38b28be8ca3b4babb3d3ea845be7894562312 Mon Sep 17 00:00:00 2001 From: Evan Jones Date: Fri, 12 May 2023 09:07:21 -0400 Subject: [PATCH] pgtype/hstore.go: Remove unused quoteHstore{Element,Replacer} These are unused. The code uses quoteArrayElement instead. --- pgtype/hstore.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pgtype/hstore.go b/pgtype/hstore.go index bb55331f..5de87da9 100644 --- a/pgtype/hstore.go +++ b/pgtype/hstore.go @@ -271,12 +271,6 @@ func (c HstoreCodec) DecodeValue(m *Map, oid uint32, format int16, src []byte) ( return hstore, nil } -var quoteHstoreReplacer = strings.NewReplacer(`\`, `\\`, `"`, `\"`) - -func quoteHstoreElement(src string) string { - return `"` + quoteArrayReplacer.Replace(src) + `"` -} - func quoteHstoreElementIfNeeded(src string) string { if src == "" || (len(src) == 4 && strings.ToLower(src) == "null") || strings.ContainsAny(src, ` {},"\=>`) { return quoteArrayElement(src)