File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ func (s *State) UpdateDomain(
248
248
)
249
249
}
250
250
// Delete old records in tracking key that are no longer present after this update
251
- domainRecordsKey := [] byte ( fmt .Sprintf ( "d_%s_records" , domainName ) )
251
+ domainRecordsKey := fmt .Appendf ( nil , "d_%s_records" , domainName )
252
252
domainRecordsItem , err := txn .Get (domainRecordsKey )
253
253
if err != nil {
254
254
if ! errors .Is (err , badger .ErrKeyNotFound ) {
@@ -289,13 +289,13 @@ func (s *State) LookupRecords(
289
289
recordName = strings .Trim (recordName , `.` )
290
290
err := s .db .View (func (txn * badger.Txn ) error {
291
291
for _ , recordType := range recordTypes {
292
- keyPrefix := []byte (
293
- fmt .Sprintf (
294
- "r_%s_%s_" ,
295
- strings .ToUpper (recordType ),
296
- recordName ,
297
- ),
292
+ keyPrefix := fmt .Appendf (
293
+ nil ,
294
+ "r_%s_%s_" ,
295
+ strings .ToUpper (recordType ),
296
+ recordName ,
298
297
)
298
+
299
299
it := txn .NewIterator (badger .DefaultIteratorOptions )
300
300
defer it .Close ()
301
301
for it .Seek (keyPrefix ); it .ValidForPrefix (keyPrefix ); it .Next () {
You can’t perform that action at this time.
0 commit comments