From e1e096e63e72c8e816082d4c96a56d07d56858ce Mon Sep 17 00:00:00 2001 From: Mickael Gaillard Date: Thu, 22 Aug 2024 12:38:45 +0200 Subject: [PATCH] Hotfix shared global variables --- cmd/upsun_clone.go | 13 +++++++++++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cmd/upsun_clone.go b/cmd/upsun_clone.go index 05d145b..065b908 100644 --- a/cmd/upsun_clone.go +++ b/cmd/upsun_clone.go @@ -6,6 +6,8 @@ import ( flag "github.com/spf13/pflag" app "github.com/upsun/clonsun" logic "github.com/upsun/clonsun/internal/logic" + libconv "github.com/upsun/convsun" + lib "github.com/upsun/lib-sun" entity "github.com/upsun/lib-sun/entity" utils "github.com/upsun/lib-sun/utility" ) @@ -141,6 +143,17 @@ func main() { //TODO utils.HasSufficientRights(projectTo.Provider) //TODO utils.HasSufficientRights(projectFrom.Provider) + //TODO(Mick) Hack (replace by context object) + lib.VERSION = app.VERSION + lib.Args = app.Args + lib.ArgsC = app.ArgsC + lib.ArgsM = app.ArgsM + lib.ArgsS = app.ArgsS + libconv.Args = app.Args + libconv.ArgsC = app.ArgsC + libconv.ArgsM = app.ArgsM + libconv.ArgsS = app.ArgsS + // Process logic.Clone(projectFrom, projectTo) } diff --git a/go.mod b/go.mod index 2f06b28..4aaa7f1 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.6 require ( github.com/spf13/pflag v1.0.5 github.com/upsun/convsun v0.3.2 - github.com/upsun/lib-sun v0.3.4 + github.com/upsun/lib-sun v0.3.5 ) require ( diff --git a/go.sum b/go.sum index decee2b..bb59998 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/upsun/convsun v0.3.2 h1:e25DpkIkg8JeYAoIw3xpgnLEDH9UV6VzbKENXaXdHL4= github.com/upsun/convsun v0.3.2/go.mod h1:r1xF3CcYqWXchsYaPRYuvqlf2H24/Miw+cLng3vUiuM= -github.com/upsun/lib-sun v0.3.4 h1:ANSleT49LOUHBO/gdKLzXTquC583K3h6IfKfUcQ2uH8= -github.com/upsun/lib-sun v0.3.4/go.mod h1:8AtRNv0L+c9qCS/maO/OVFIn2VDi89LTkWwpB7YKTDE= +github.com/upsun/lib-sun v0.3.5 h1:Np4d2pPhNy6pFwNfoA0cy7b4UyjfqCKAh+DybUSSAXk= +github.com/upsun/lib-sun v0.3.5/go.mod h1:8AtRNv0L+c9qCS/maO/OVFIn2VDi89LTkWwpB7YKTDE= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=