mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
✏️ 标准化log
This commit is contained in:
parent
ef1981934b
commit
9ea41412ad
31
.github/workflows/golint.yml
vendored
Normal file
31
.github/workflows/golint.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: PushLint
|
||||
on: [push]
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||||
version: latest
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
# working-directory: somedir
|
||||
|
||||
# Optional: golangci-lint command line arguments.
|
||||
# args: --issues-exit-code=0
|
||||
|
||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||
# only-new-issues: true
|
||||
|
||||
# Optional: if set to true then the action will use pre-installed Go.
|
||||
# skip-go-installation: true
|
||||
|
||||
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
|
||||
# skip-pkg-cache: true
|
||||
|
||||
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
|
||||
# skip-build-cache: true
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,4 +4,3 @@ data/manager
|
||||
.idea/
|
||||
.DS_Store
|
||||
.vscode
|
||||
.github/workflows/golint.yml
|
||||
|
||||
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.16
|
||||
require (
|
||||
github.com/FloatTech/AnimeAPI v0.0.0-20210713044920-63367fe18ccd
|
||||
github.com/FloatTech/ZeroBot-ACGImage v1.5.5
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.3.4
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.4.2
|
||||
github.com/StackExchange/wmi v1.2.1 // indirect
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/robfig/cron v1.2.0
|
||||
|
||||
4
go.sum
4
go.sum
@ -4,6 +4,10 @@ github.com/FloatTech/ZeroBot-ACGImage v1.5.5 h1:cmAsXHl99RHJR38vQXL+q/U0BGWg5LyM
|
||||
github.com/FloatTech/ZeroBot-ACGImage v1.5.5/go.mod h1:TDGCgGHKjgcnA0akLaEwUcFwL+/ya7p6PZITdJQ1vnQ=
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.3.4 h1:nRJqY/S7TRlN32MQGIBH3UWfVrpjxpJXCnp42pd2O2Q=
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.3.4/go.mod h1:NuODdnVhf9AClsJBdYFqnL9sQE7VIRZyZos37J286n0=
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.4.1 h1:LVSTyfLlhcJEES16r3gyhN2jd2WJUlQiN193f0DdJ7Q=
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.4.1/go.mod h1:NuODdnVhf9AClsJBdYFqnL9sQE7VIRZyZos37J286n0=
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.4.2 h1:w/JerL8DwdyoxZYB4HRMaHANRV2j+r5XxaQhVB0sjBw=
|
||||
github.com/FloatTech/ZeroBot-Plugin-Timer v1.4.2/go.mod h1:MVOQQ4e6AVGFm993blXXU4Sd6bAsLY2+Zb+/HMrEeEc=
|
||||
github.com/FloatTech/Zerobot-ACGImage-Classify v1.3.3 h1:mMaBe23yg8mk5U0yb9OS9iX/9hju6Dj+Z+Fty18vIhU=
|
||||
github.com/FloatTech/Zerobot-ACGImage-Classify v1.3.3/go.mod h1:swPvVKyXu1YFWZ7Kt6R79LgIa16hs4cE1E5LroBB2SQ=
|
||||
github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
|
||||
|
||||
4
main.go
4
main.go
@ -59,9 +59,9 @@ func init() {
|
||||
|
||||
func main() {
|
||||
fmt.Print(
|
||||
"====================[ZeroBot-Plugin]====================",
|
||||
"======================[ZeroBot-Plugin]======================",
|
||||
"\n", strings.Join(content, "\n"), "\n",
|
||||
"========================================================",
|
||||
"============================================================\n",
|
||||
) // 启动打印
|
||||
zero.Run(zero.Config{
|
||||
NickName: []string{"椛椛", "ATRI", "atri", "亚托莉", "アトリ"},
|
||||
|
||||
@ -2,10 +2,11 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -28,9 +29,9 @@ func init() {
|
||||
}
|
||||
err1 := LoadText()
|
||||
if err1 == nil {
|
||||
fmt.Printf("[Diana]读取%d条小作文\n", len(*Array))
|
||||
log.Printf("[Diana]读取%d条小作文", len(*Array))
|
||||
} else {
|
||||
fmt.Printf("[Diana]读取小作文错误:%v\n", err1)
|
||||
log.Printf("[Diana]读取小作文错误:%v", err1)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user