feat:优化项目信息
This commit is contained in:
@ -2,6 +2,7 @@ package utils
|
||||
|
||||
import (
|
||||
"gopkg.in/yaml.v2"
|
||||
"io"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
@ -36,3 +37,23 @@ func TestNewFile(t *testing.T) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewOpenFile(t *testing.T) {
|
||||
file, err := os.Open("BizChat(1).db-shm")
|
||||
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
_bytes := make([]byte, 0)
|
||||
|
||||
if _bytes, err = io.ReadAll(file); err != nil {
|
||||
t.Log(err)
|
||||
return
|
||||
}
|
||||
t.Log(_bytes)
|
||||
|
||||
t.Log(string(_bytes[0:2]))
|
||||
}
|
||||
|
Reference in New Issue
Block a user