From d54504ed6dad5fed8e08e981a56d6bd4b142e86e Mon Sep 17 00:00:00 2001 From: consolethinks Date: Fri, 13 Sep 2024 10:19:31 +0200 Subject: [PATCH] upgrade imports for major version change --- cmd/cliutils/sshTransfer.go | 2 +- cmd/commands/args_test.go | 2 +- cmd/commands/authenticate.go | 2 +- cmd/commands/datasetArchiver.go | 2 +- cmd/commands/datasetCleaner.go | 2 +- cmd/commands/datasetGetProposal.go | 2 +- cmd/commands/datasetIngestor.go | 6 ++--- cmd/commands/datasetPublishData.go | 2 +- cmd/commands/datasetPublishDataRetrieve.go | 2 +- cmd/commands/datasetRetriever.go | 2 +- cmd/commands/flags_test.go | 2 +- cmd/commands/globusCheckTransfer.go | 6 ++--- cmd/commands/waitForJobFinished.go | 2 +- cmd/main.go | 2 +- datasetIngestor/checkMetadata.go | 2 +- go.mod | 22 +++++++++--------- go.sum | 26 ++++++++++++++++++++++ 17 files changed, 56 insertions(+), 30 deletions(-) diff --git a/cmd/cliutils/sshTransfer.go b/cmd/cliutils/sshTransfer.go index 9008935..31fbad9 100644 --- a/cmd/cliutils/sshTransfer.go +++ b/cmd/cliutils/sshTransfer.go @@ -4,7 +4,7 @@ import ( "log" "os" - "github.com/paulscherrerinstitute/scicat/datasetIngestor" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetIngestor" ) func SshTransfer(params TransferParams) (archivable bool, err error) { diff --git a/cmd/commands/args_test.go b/cmd/commands/args_test.go index 6d50c6e..ff7c67e 100644 --- a/cmd/commands/args_test.go +++ b/cmd/commands/args_test.go @@ -3,7 +3,7 @@ package cmd import ( "testing" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" ) func TestArgs(t *testing.T) { diff --git a/cmd/commands/authenticate.go b/cmd/commands/authenticate.go index 37b318d..f7c595b 100644 --- a/cmd/commands/authenticate.go +++ b/cmd/commands/authenticate.go @@ -7,7 +7,7 @@ import ( "strings" "syscall" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "golang.org/x/term" ) diff --git a/cmd/commands/datasetArchiver.go b/cmd/commands/datasetArchiver.go index 847f58e..e314ed3 100644 --- a/cmd/commands/datasetArchiver.go +++ b/cmd/commands/datasetArchiver.go @@ -11,7 +11,7 @@ import ( "time" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/datasetCleaner.go b/cmd/commands/datasetCleaner.go index b4908b6..98b5afc 100644 --- a/cmd/commands/datasetCleaner.go +++ b/cmd/commands/datasetCleaner.go @@ -8,7 +8,7 @@ import ( "time" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/datasetGetProposal.go b/cmd/commands/datasetGetProposal.go index b341823..55faba0 100644 --- a/cmd/commands/datasetGetProposal.go +++ b/cmd/commands/datasetGetProposal.go @@ -9,7 +9,7 @@ import ( "time" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/datasetIngestor.go b/cmd/commands/datasetIngestor.go index fc2ca33..556202a 100644 --- a/cmd/commands/datasetIngestor.go +++ b/cmd/commands/datasetIngestor.go @@ -14,9 +14,9 @@ import ( "github.com/SwissOpenEM/globus" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/cmd/cliutils" - "github.com/paulscherrerinstitute/scicat/datasetIngestor" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/cmd/cliutils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetIngestor" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/datasetPublishData.go b/cmd/commands/datasetPublishData.go index dab15cf..e92a259 100644 --- a/cmd/commands/datasetPublishData.go +++ b/cmd/commands/datasetPublishData.go @@ -17,7 +17,7 @@ import ( "unicode/utf8" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/datasetPublishDataRetrieve.go b/cmd/commands/datasetPublishDataRetrieve.go index ca953f5..093c294 100644 --- a/cmd/commands/datasetPublishDataRetrieve.go +++ b/cmd/commands/datasetPublishDataRetrieve.go @@ -9,7 +9,7 @@ import ( "time" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/datasetRetriever.go b/cmd/commands/datasetRetriever.go index 04aef4d..310df4a 100644 --- a/cmd/commands/datasetRetriever.go +++ b/cmd/commands/datasetRetriever.go @@ -11,7 +11,7 @@ import ( "time" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/flags_test.go b/cmd/commands/flags_test.go index e488d48..174e07e 100644 --- a/cmd/commands/flags_test.go +++ b/cmd/commands/flags_test.go @@ -3,7 +3,7 @@ package cmd import ( "testing" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/pflag" ) diff --git a/cmd/commands/globusCheckTransfer.go b/cmd/commands/globusCheckTransfer.go index 08d8d51..50b01e4 100644 --- a/cmd/commands/globusCheckTransfer.go +++ b/cmd/commands/globusCheckTransfer.go @@ -12,9 +12,9 @@ import ( "github.com/SwissOpenEM/globus" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/cmd/cliutils" - "github.com/paulscherrerinstitute/scicat/datasetIngestor" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/cmd/cliutils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetIngestor" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/commands/waitForJobFinished.go b/cmd/commands/waitForJobFinished.go index bf6d255..97652ae 100644 --- a/cmd/commands/waitForJobFinished.go +++ b/cmd/commands/waitForJobFinished.go @@ -12,7 +12,7 @@ import ( "time" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" "github.com/spf13/cobra" ) diff --git a/cmd/main.go b/cmd/main.go index f35f39a..d00724d 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,6 +1,6 @@ package main -import cmd "github.com/paulscherrerinstitute/scicat/cmd/commands" +import cmd "github.com/paulscherrerinstitute/scicat-cli/v3/cmd/commands" func main() { cmd.Execute() diff --git a/datasetIngestor/checkMetadata.go b/datasetIngestor/checkMetadata.go index fa204c1..57fe63e 100644 --- a/datasetIngestor/checkMetadata.go +++ b/datasetIngestor/checkMetadata.go @@ -13,7 +13,7 @@ import ( "strings" "github.com/fatih/color" - "github.com/paulscherrerinstitute/scicat/datasetUtils" + "github.com/paulscherrerinstitute/scicat-cli/v3/datasetUtils" ) const ( diff --git a/go.mod b/go.mod index be18a97..9d9f8b8 100644 --- a/go.mod +++ b/go.mod @@ -6,26 +6,26 @@ toolchain go1.22.5 require ( github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 - github.com/SwissOpenEM/globus v0.0.0-20240822132653-119ec5e19eab - github.com/fatih/color v1.13.0 + github.com/SwissOpenEM/globus v0.1.0 + github.com/fatih/color v1.17.0 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.6.1 - golang.org/x/crypto v0.17.0 - golang.org/x/oauth2 v0.19.0 - golang.org/x/term v0.15.0 + github.com/stretchr/testify v1.9.0 + golang.org/x/crypto v0.27.0 + golang.org/x/oauth2 v0.23.0 + golang.org/x/term v0.24.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/creack/pty v1.1.17 // indirect + github.com/creack/pty v1.1.23 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/mattn/go-colorable v0.1.9 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.25.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3d8716b..238e877 100644 --- a/go.sum +++ b/go.sum @@ -2,14 +2,21 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/SwissOpenEM/globus v0.0.0-20240822132653-119ec5e19eab h1:Kn57UraLrMUdm/fXZM6qD60xh3vd3B9k1I42JIGvcqo= github.com/SwissOpenEM/globus v0.0.0-20240822132653-119ec5e19eab/go.mod h1:HiMwPdtUdztPpnA0TamNWBBRPGYjEJWXSRUIV5vjqXc= +github.com/SwissOpenEM/globus v0.1.0 h1:ruJXjwre6a3Cu/39QTcFEluJ4OquU40BKnqL3LNL5C8= +github.com/SwissOpenEM/globus v0.1.0/go.mod h1:HiMwPdtUdztPpnA0TamNWBBRPGYjEJWXSRUIV5vjqXc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/creack/pty v1.1.23 h1:4M6+isWdcStXEf15G/RbrMPOQj1dZ7HPZCGwE4kOeP0= +github.com/creack/pty v1.1.23/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -18,9 +25,14 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2 h1:YocNLcTBdEdvY3iDK6jfWXvEaM5OCKkjxPKoJRdB3Gg= github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -28,22 +40,36 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg= golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=