omit empty quality from option string

This commit is contained in:
Will Norris 2015-05-11 19:29:25 -07:00
parent b1de3a9dd6
commit 5d8b630ff2
2 changed files with 4 additions and 2 deletions

View file

@ -80,7 +80,9 @@ func (o Options) String() string {
if o.FlipHorizontal {
fmt.Fprintf(buf, ",%s", optFlipHorizontal)
}
fmt.Fprintf(buf, ",%s%d", string(optQualityPrefix), o.Quality)
if o.Quality != 0 {
fmt.Fprintf(buf, ",%s%d", string(optQualityPrefix), o.Quality)
}
return buf.String()
}