feat: upload

This commit is contained in:
Rogee
2025-01-15 10:43:16 +08:00
parent 9bfdf0e0ea
commit ab827715fb
16 changed files with 378 additions and 161 deletions

View File

@@ -1 +1,26 @@
package main
import (
"os"
"path/filepath"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func Test_mkdir(t *testing.T) {
Convey("Test os.MkdirAll", t, func() {
path := filepath.Join(os.TempDir(), "abc")
defer os.RemoveAll(path)
Convey("first create a directory", func() {
err := os.MkdirAll(path, 0o755)
So(err, ShouldBeNil)
})
Convey("create a directory again", func() {
err := os.MkdirAll(path, 0o755)
So(err, ShouldBeNil)
})
})
}