mirror of
https://github.com/xiaoqidun/setft.git
synced 2026-01-11 00:10:21 +08:00
feat(初始项目): 初始项目
This commit is contained in:
16
setft_test.go
Normal file
16
setft_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package setft
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestSetFileTime(t *testing.T) {
|
||||
layout := "2006-01-02 15:04:05"
|
||||
atime, _ := time.ParseInLocation(layout, "2021-01-01 00:00:00", time.Local)
|
||||
ctime, _ := time.ParseInLocation(layout, "2021-01-01 00:00:00", time.Local)
|
||||
mtime, _ := time.ParseInLocation(layout, "2021-01-01 00:00:00", time.Local)
|
||||
if err := SetFileTime("setft_test.go", atime, ctime, mtime); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user