File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -169,19 +169,19 @@ func (t *timer) FindCronList() map[string]*taskManager {
169
169
}
170
170
171
171
// StartCron 开始任务
172
- func (t * timer ) StartCron (cromName string ) {
172
+ func (t * timer ) StartCron (cronName string ) {
173
173
t .Lock ()
174
174
defer t .Unlock ()
175
- if v , ok := t .cronList [cromName ]; ok {
175
+ if v , ok := t .cronList [cronName ]; ok {
176
176
v .corn .Start ()
177
177
}
178
178
}
179
179
180
180
// StopCron 停止任务
181
- func (t * timer ) StopCron (cromName string ) {
181
+ func (t * timer ) StopCron (cronName string ) {
182
182
t .Lock ()
183
183
defer t .Unlock ()
184
- if v , ok := t .cronList [cromName ]; ok {
184
+ if v , ok := t .cronList [cronName ]; ok {
185
185
v .corn .Stop ()
186
186
}
187
187
}
Original file line number Diff line number Diff line change 5
5
"io"
6
6
"mime/multipart"
7
7
"os"
8
- "path"
8
+ "path/filepath "
9
9
"strings"
10
10
"time"
11
11
@@ -27,7 +27,7 @@ type Local struct{}
27
27
28
28
func (* Local ) UploadFile (file * multipart.FileHeader ) (string , string , error ) {
29
29
// 读取文件后缀
30
- ext := path .Ext (file .Filename )
30
+ ext := filepath .Ext (file .Filename )
31
31
// 读取文件名并加密
32
32
name := strings .TrimSuffix (file .Filename , ext )
33
33
name = utils .MD5V ([]byte (name ))
You can’t perform that action at this time.
0 commit comments