This commit is contained in:
TsMask
2023-08-22 19:25:39 +08:00
parent 38d3b7450e
commit 96de169777
45 changed files with 881 additions and 676 deletions

20
core/file/file_test.go Normal file
View File

@@ -0,0 +1,20 @@
package file
import (
"fmt"
"testing"
"time"
)
func TestFile(t *testing.T) {
var meta FileMeta
meta.DirRoot = "FTP"
meta.Province = "BJ"
meta.DeviceCode = "0001"
meta.Index = "001"
meta.Time = time.Now().Format("20060102150405")
meta.Compress = false
content := "this a test file"
f, err := GenFile(&meta, []byte(content))
fmt.Println(f, err)
}