From faaec649ead00567ced56edfa9db11eb34655178 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 29 Jun 2023 06:00:45 -0400 Subject: [PATCH] fix(tus): switch to normal clone package, not generic --- go.mod | 3 +-- go.sum | 2 -- tusstore/store.go | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 01cf630..ea5f48f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/go-resty/resty/v2 v2.7.0 github.com/golang-queue/queue v0.1.3 - github.com/huandu/go-clone/generic v1.6.0 + github.com/huandu/go-clone v1.6.0 github.com/imdario/mergo v0.3.16 github.com/iris-contrib/swagger v0.0.0-20230531125653-f4ee631290a7 github.com/kataras/iris/v12 v12.2.0 @@ -55,7 +55,6 @@ require ( github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/huandu/go-clone v1.6.0 // indirect github.com/iris-contrib/go.uuid v2.0.0+incompatible // indirect github.com/iris-contrib/schema v0.0.6 // indirect github.com/jinzhu/inflection v1.0.0 // indirect diff --git a/go.sum b/go.sum index 92eca96..8dd2dca 100644 --- a/go.sum +++ b/go.sum @@ -902,8 +902,6 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/go-clone v1.6.0 h1:HMo5uvg4wgfiy5FoGOqlFLQED/VGRm2D9Pi8g1FXPGc= github.com/huandu/go-clone v1.6.0/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE= -github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U= -github.com/huandu/go-clone/generic v1.6.0/go.mod h1:xgd9ZebcMsBWWcBx5mVMCoqMX24gLWr5lQicr+nVXNs= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= diff --git a/tusstore/store.go b/tusstore/store.go index c1391ee..73f5699 100644 --- a/tusstore/store.go +++ b/tusstore/store.go @@ -12,7 +12,7 @@ import ( "git.lumeweb.com/LumeWeb/portal/service/auth" "git.lumeweb.com/LumeWeb/portal/shared" "github.com/golang-queue/queue" - clone "github.com/huandu/go-clone/generic" + clone "github.com/huandu/go-clone" "github.com/kataras/iris/v12" "github.com/tus/tusd/pkg/handler" "go.uber.org/zap" @@ -151,7 +151,7 @@ type fileUpload struct { } func (upload *fileUpload) GetInfo(ctx context.Context) (handler.FileInfo, error) { - info := clone.Clone(upload.info) + info := clone.Clone(upload.info).(handler.FileInfo) info.Storage["uploader"] = strconv.Itoa(int(upload.uploader)) return upload.info, nil