aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-03-28 21:20:38 -0500
committerAnthony Wang2022-03-28 21:20:38 -0500
commit7a082a7f2db4ed2eb563e58e1a4ceeb1e345a876 (patch)
tree5ea6e550a0d8c3cbfb9b6e36b51ac3fb2e985feb
parent82cca1a6c31fd05dcef268010c8eaff80cbc6de3 (diff)
Run gofumpt on everything
-rw-r--r--examples/gen.go8
-rw-r--r--sd.go6
2 files changed, 9 insertions, 5 deletions
diff --git a/examples/gen.go b/examples/gen.go
index e25a308..8a0f983 100644
--- a/examples/gen.go
+++ b/examples/gen.go
@@ -18,8 +18,10 @@ https://lingua.mtsu.edu/chinese-computing/statistics/char/list.php?Which=MO
https://jslearnchinese.wordpress.com/2018/07/24/the-1000-most-used-characters-in-chinese/
*/
-var verbose = flag.Bool("v", false, "debug output")
-var file = flag.String("f", "cards", "cards file")
+var (
+ verbose = flag.Bool("v", false, "debug output")
+ file = flag.String("f", "cards", "cards file")
+)
func main() {
flag.Parse()
@@ -42,7 +44,7 @@ func main() {
defer f.Close()
scanner := bufio.NewScanner(f)
-
+
i := 0
for scanner.Scan() {
line := strings.Split(scanner.Text(), "|")
diff --git a/sd.go b/sd.go
index 3cd66b8..e2a50d1 100644
--- a/sd.go
+++ b/sd.go
@@ -11,8 +11,10 @@ import (
_ "modernc.org/sqlite"
)
-var verbose = flag.Bool("v", false, "debug output")
-var file = flag.String("f", "cards", "cards file")
+var (
+ verbose = flag.Bool("v", false, "debug output")
+ file = flag.String("f", "cards", "cards file")
+)
func main() {
flag.Parse()