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.
strings.Builder
has significantly better performance thanbytes.Buffer
and should be used instead.Some minor changes have also been made to the tests, including replacing a call to
fmt.Fprintln
withFprint
and using!strings.Contains
instead ofstrings.Index(s, substr) == -1
.