diff --git a/archives/decompress.go b/archives/decompress.go index 883976c..04a0ce9 100644 --- a/archives/decompress.go +++ b/archives/decompress.go @@ -1,10 +1,11 @@ -package pkg +package archives import ( "archive/tar" "archive/zip" "go.uber.org/zap" "io" + "lab.evlic.cn/go/pkg/files" "os" "path/filepath" ) @@ -72,7 +73,7 @@ func decompressSave(name, dst string, file ArchiveFile) { rd.Close() return } - err = FileSave(rd, dst) + err = files.FileSave(rd, dst) rd.Close() if err != nil { zap.S().Infof("\tsave %#q err %#v: %q\n", name, err, err.Error()) diff --git a/archives/decompress_test.go b/archives/decompress_test.go index e3e429d..6557064 100644 --- a/archives/decompress_test.go +++ b/archives/decompress_test.go @@ -1,4 +1,4 @@ -package pkg +package archives import ( "testing" diff --git a/config/config.go b/config/config.go index b01af10..fd37458 100644 --- a/config/config.go +++ b/config/config.go @@ -1,4 +1,4 @@ -package pkg +package config import ( "bytes" diff --git a/config/config_test.go b/config/config_test.go index b39410d..e3a4a55 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -1,7 +1,9 @@ -package pkg +package config import ( "encoding/json" + "lab.evlic.cn/go/pkg/str" + "sync" "testing" ) @@ -34,6 +36,6 @@ func TestUn(t *testing.T) { t.Fatal(err) } res, err := json.Marshal(r) - t.Log(B2S(res), err) + t.Log(str.B2S(res), err) }) } diff --git a/errors/error.go b/errors/error.go index 4061fc0..4f84f2d 100644 --- a/errors/error.go +++ b/errors/error.go @@ -1,4 +1,4 @@ -package pkg +package errors import ( "fmt" diff --git a/errors/error_test.go b/errors/error_test.go index bf587d3..6fbb42a 100644 --- a/errors/error_test.go +++ b/errors/error_test.go @@ -1,4 +1,4 @@ -package pkg +package errors import ( "testing" diff --git a/files/file.go b/files/file.go index 7538013..0dc2a7b 100644 --- a/files/file.go +++ b/files/file.go @@ -1,4 +1,4 @@ -package pkg +package files import ( "bufio" diff --git a/files/file_test.go b/files/file_test.go index bda2a86..2ad811c 100644 --- a/files/file_test.go +++ b/files/file_test.go @@ -1,4 +1,4 @@ -package pkg +package files import ( "crypto/md5" diff --git a/files/file_util.go b/files/file_util.go index b038c2d..681ab3a 100644 --- a/files/file_util.go +++ b/files/file_util.go @@ -1,11 +1,11 @@ -package pkg +package files import ( - "crypto/md5" "errors" "io" + "lab.evlic.cn/go/pkg/md5" "mime/multipart" - os "os" + "os" "path/filepath" "strings" diff --git a/set/set.go b/set/set.go index ed618f9..d507534 100644 --- a/set/set.go +++ b/set/set.go @@ -1,4 +1,4 @@ -package pkg +package set import ( "strings" diff --git a/set/set_test.go b/set/set_test.go index 98101a2..33e7cce 100644 --- a/set/set_test.go +++ b/set/set_test.go @@ -1,4 +1,4 @@ -package pkg +package set import ( "testing" diff --git a/sqlite/db.go b/sqlite/db.go index 314fea7..268c51e 100644 --- a/sqlite/db.go +++ b/sqlite/db.go @@ -4,8 +4,8 @@ import ( "fmt" "gorm.io/driver/sqlite" "gorm.io/gorm" - "packet-flow/pkg/db" - "packet-flow/pkg/log" + "lab.evlic.cn/go/pkg/db" + "lab.evlic.cn/go/pkg/log" ) const ( diff --git a/str/uuid.go b/str/uuid.go index d6ab153..8eef6c3 100644 --- a/str/uuid.go +++ b/str/uuid.go @@ -1,4 +1,4 @@ -package pkg +package str import ( "github.com/google/uuid"