ajstarks / svgo

Go Language Library for SVG generation
Other
2.15k stars 170 forks source link

Added attributes to svg.Startview and svg.StartviewUnit #38

Open countcb opened 7 years ago

countcb commented 7 years ago

Added attributes to svg.Startview and svg.StartviewUnit

Was wondering why these two methods had no way of adding attributes like the others. I hope the changes are ok. If not I can change some things or you can deny the pull request :)

ajstarks commented 7 years ago

StartRaw was meant to handle the arbitrary case.

countcb commented 7 years ago

Hmm. ok. I found it a little bit strange that 3 out of 5 Start methods had the attributes param and only 2 didn't.

Start, Startunit and Startpercent already have the extra attributes. Only Startview and StartviewUnit don't.

I feel that all of them should have them (no harm since the attributes param is optional), otherwise it feels a little bit inconsistent.

But feel free to close this PR if you think different :)

ajstarks commented 7 years ago

@countcb you are right, it is inconsistent, and my (probably) lame attempt at a general solution was StartRaw.

thinking...