💩👌 make lint happy

This commit is contained in:
fumiama
2021-08-06 18:52:41 +08:00
parent 932abcbdb6
commit 178b55ad52
2 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
// Package data 加载位于 datapath 的小作文
package data
import (
@@ -13,6 +14,7 @@ const (
var (
compo Composition
// 小作文数组
Array []string
)
@@ -29,6 +31,7 @@ func init() {
}()
}
// 加载小作文
func LoadText() error {
if _, err := os.Stat(pbfile); err == nil || os.IsExist(err) {
f, err := os.Open(pbfile)
@@ -46,6 +49,7 @@ func LoadText() error {
return nil
}
// 添加小作文
func AddText(txt string) error {
if txt != "" {
compo.Array = append(compo.Array, txt)