miniflux/vendor/github.com/tdewolff/minify/benchmarks/main_test.go
Frédéric Guillot 8ffb773f43 First commit
2017-11-19 22:01:46 -08:00

18 lines
379 B
Go

package benchmarks
import (
"io/ioutil"
"github.com/tdewolff/minify"
"github.com/tdewolff/parse/buffer"
)
var m = minify.New()
var r = map[string]*buffer.Reader{}
var w = map[string]*buffer.Writer{}
func load(filename string) {
sample, _ := ioutil.ReadFile(filename)
r[filename] = buffer.NewReader(sample)
w[filename] = buffer.NewWriter(make([]byte, 0, len(sample)))
}