mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
💩👌 make lint happy
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/FloatTech/ZeroBot-Plugin/plugin_diana/data"
|
||||
@@ -27,7 +28,7 @@ func main() {
|
||||
scanner := bufio.NewScanner(file)
|
||||
// optionally, resize scanner's capacity for lines over 64K, see next example
|
||||
for scanner.Scan() {
|
||||
//fmt.Println(scanner.Text())
|
||||
// fmt.Println(scanner.Text())
|
||||
compo.Array = append(compo.Array, scanner.Text())
|
||||
}
|
||||
|
||||
@@ -39,6 +40,13 @@ func main() {
|
||||
f, err1 := os.OpenFile(os.Args[2], os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0644)
|
||||
if err1 == nil {
|
||||
defer f.Close()
|
||||
f.Write(data)
|
||||
_, err2 := f.Write(data)
|
||||
if err2 == nil {
|
||||
fmt.Println("成功")
|
||||
} else {
|
||||
panic(err2)
|
||||
}
|
||||
} else {
|
||||
panic(err1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user