]> Sergey Matveev's repositories - uploader.git/blobdiff - main.go
Updated dependencies
[uploader.git] / main.go
diff --git a/main.go b/main.go
index e3740f9a2ebac73e13d4f5a84fff63d64aee3d79..f97f4df68647fcd4ce7b5a18a17d997577b2a86a 100644 (file)
--- a/main.go
+++ b/main.go
@@ -38,7 +38,7 @@ import (
        "time"
 
        "go.cypherpunks.ru/recfile"
-       "go.cypherpunks.ru/tai64n"
+       "go.cypherpunks.ru/tai64n/v2"
        "golang.org/x/crypto/blake2b"
        "golang.org/x/net/netutil"
 )
@@ -130,8 +130,8 @@ func upload(w http.ResponseWriter, r *http.Request) {
        }
        t := time.Now()
        ts := new(tai64n.TAI64N)
-       tai64n.FromTime(t, ts)
-       tai := ts.Encode()[1:]
+       ts.FromTime(t)
+       tai := tai64n.Encode(ts[:])[1:]
        fnOrig := p.FileName()
        fd, err := os.OpenFile(tai+".part", os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0666)
        if err != nil {