yosssi / ace

HTML template engine for Go
MIT License
835 stars 89 forks source link

Replace sorted map with slice for HTML attributes #40

Closed bep closed 9 years ago

bep commented 9 years ago

For cleaner code and performance reasons.

See #38

yosssi commented 9 years ago

@bjornerik Thanks! Great work! I don't know why the initial cap size of htmlAttribute is 2, but it's OK.

bep commented 9 years ago

About the cap size, I don't know the internals of Go to say definitive, but two seemed like a good default starting cap size for HTML attributes. The growing algorithm of append should be very efficient, but I don't think it hurts to start out 2.