Skip to content

Commit

Permalink
refactor: the generative way of svg of demo
Browse files Browse the repository at this point in the history
  • Loading branch information
piglig committed Dec 24, 2023
1 parent d82145c commit e556610
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
go_qr "github.com/piglig/go-qr"
"image/color"
"os"
"strings"
)

Expand All @@ -29,17 +28,7 @@ func doBasicDemo() {
return
}

svg, err := toSvgString(qr, 4, "#FFFFFF", "#000000")
if err != nil {
return
}

svgFile, err := os.Create("hello-world-QR.svg")
if err != nil {
return
}
defer svgFile.Close()
_, err = svgFile.WriteString(svg)
err = qr.SVG(config, "hello-world-QR.svg", "#FFFFFF", "#000000")
if err != nil {
return
}
Expand Down

0 comments on commit e556610

Please sign in to comment.