Files
nbi_alarm/core/file/file_test.go
2023-08-22 19:25:39 +08:00

21 lines
360 B
Go

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)
}