同步代码

This commit is contained in:
TsMask
2023-08-21 11:00:22 +08:00
parent 2735cc3009
commit 788f01674a
37 changed files with 2211 additions and 1 deletions

20
lib/file_test.go Normal file
View File

@@ -0,0 +1,20 @@
package lib
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)
}