Skip to content

Commit

Permalink
fix: default image options should be used
Browse files Browse the repository at this point in the history
  • Loading branch information
yeqown committed Feb 16, 2021
1 parent bc2715f commit 6efc0b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qrcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (

// New generate a QRCode struct to create
func New(text string, opts ...ImageOption) (*QRCode, error) {
dst := new(outputImageOptions)
dst := _defaultOutputOption
for _, opt := range opts {
opt.apply(dst)
}
Expand All @@ -46,7 +46,7 @@ func New(text string, opts ...ImageOption) (*QRCode, error) {
// NewWithSpecV generate a QRCode struct with
// specified `ver`(QR version) and `ecLv`(Error Correction level)
func NewWithSpecV(text string, ver int, ecLv ecLevel, opts ...ImageOption) (*QRCode, error) {
dst := new(outputImageOptions)
dst := _defaultOutputOption
for _, opt := range opts {
opt.apply(dst)
}
Expand Down

0 comments on commit 6efc0b3

Please sign in to comment.