]> Sergey Matveev's repositories - uploader.git/commitdiff
Updated dependencies
authorSergey Matveev <stargrave@stargrave.org>
Wed, 19 May 2021 18:40:25 +0000 (21:40 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 19 May 2021 18:40:53 +0000 (21:40 +0300)
go.mod
go.sum
main.go

diff --git a/go.mod b/go.mod
index 6f727c27c041e7f0735efde90672e518dc271fb1..ed566d8b8fcf75c5578bba50d49814528fd69023 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -3,8 +3,8 @@ module go.stargrave.org/uploader
 go 1.12
 
 require (
-       go.cypherpunks.ru/recfile v0.4.0
-       go.cypherpunks.ru/tai64n v0.2.0
+       go.cypherpunks.ru/recfile v0.4.3
+       go.cypherpunks.ru/tai64n/v2 v2.0.0
        golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9
        golang.org/x/net v0.0.0-20201209123823-ac852fbbde11
 )
diff --git a/go.sum b/go.sum
index 02a2e671f8017fe817c6820acb13d8948b9e094f..544744e7637f75782b01c43c3e96c4f2c6ba08ee 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -1,7 +1,7 @@
-go.cypherpunks.ru/recfile v0.4.0 h1:BvNraS8PPVGKvcttbSfdOmTUsmLRke6OuN4z6SeKQNk=
-go.cypherpunks.ru/recfile v0.4.0/go.mod h1:p1ZUMeyQQbQg+ICtKH3+Zt59QLI0tCZYZj/75Vp1buk=
-go.cypherpunks.ru/tai64n v0.2.0 h1:ox04T0m9wVngTb5tDwrPyifukr01c6iJXHHJldlMQu8=
-go.cypherpunks.ru/tai64n v0.2.0/go.mod h1:mjuUq/ZQAOEKvzAAl25RIrN6JExWA4fRkOs7o7OVvYE=
+go.cypherpunks.ru/recfile v0.4.3 h1:ephokihmV//p0ob6gx2FWXvm28/NBDbWTOJPUNahxO8=
+go.cypherpunks.ru/recfile v0.4.3/go.mod h1:sR+KajB+vzofL3SFVFwKt3Fke0FaCcN1g3YPNAhU3qI=
+go.cypherpunks.ru/tai64n/v2 v2.0.0 h1:AlohA1/zRqInhIGK7CVnn7tC5/vt1TaOAEyBgeu5Ruo=
+go.cypherpunks.ru/tai64n/v2 v2.0.0/go.mod h1:9eeXyzoNO/8grf+bw+T1HXRCRjHVXjUsvnIyaUkjS5I=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 h1:sYNJzB4J8toYPQTM6pAkcmBRgw9SnQKP9oXCHfgy604=
 golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
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 {