use helper function

This commit is contained in:
Ted Unangst 2023-06-18 21:47:26 -04:00
parent 7d6556ee36
commit e3c4040aa3
1 changed files with 1 additions and 3 deletions

View File

@ -1627,10 +1627,8 @@ var oldjonkers = cache.New(cache.Options{Filler: func(name string) ([]byte, bool
if err != nil { if err != nil {
return nil, false return nil, false
} }
var buf bytes.Buffer
j := junkuser(user) j := junkuser(user)
j.Write(&buf) return buf.ToBytes(), true
return buf.Bytes(), true
}, Duration: 1 * time.Minute}) }, Duration: 1 * time.Minute})
func asjonker(name string) ([]byte, bool) { func asjonker(name string) ([]byte, bool) {