antchfx / htmlquery

htmlquery is golang XPath package for HTML query.
https://github.com/antchfx/xpath
MIT License
723 stars 73 forks source link

Replace bytes.Buffer with strings.Builder #54

Closed egginabucket closed 1 year ago

egginabucket commented 1 year ago

strings.Builder has significantly better performance than bytes.Buffer and should be used instead.

Some minor changes have also been made to the tests, including replacing a call to fmt.Fprintln with Fprint and using !strings.Contains instead of strings.Index(s, substr) == -1.