Skip to content

Commit

Permalink
Remove redundant replace directives
Browse files Browse the repository at this point in the history
The replace directives for the packages github.com/ajg/form and github.com/samalba/dockerclient are both redundant.

We can require github.com/cezarsa/form directly and bypass the replace.

	gofmt -w -r '"github.com/ajg/form" -> "github.com/cezarsa/form"' .

The second replaced package does not seem to be in use according to `go list
-m all`.

This also requires a recent enough commit of tsuru after tsuru/tsuru!2703.

There is a hidden bonus that `go install github.com/tsuru/tsuru-client/tsuru@latest`
is now a thing.
  • Loading branch information
mauri870 committed Jun 17, 2024
1 parent 2abeca4 commit 643b72b
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 22 deletions.
8 changes: 2 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.21

require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f
github.com/antihax/optional v1.0.0
github.com/cezarsa/form v0.0.0-20210510165411-863b166467b9
github.com/ghodss/yaml v1.0.0
github.com/hashicorp/go-version v1.2.0
github.com/iancoleman/orderedmap v0.2.0
Expand All @@ -31,6 +31,7 @@ require (
require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down Expand Up @@ -89,8 +90,3 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
github.com/ajg/form => github.com/cezarsa/form v0.0.0-20210510165411-863b166467b9
github.com/samalba/dockerclient => github.com/cezarsa/dockerclient v0.0.0-20190924055524-af5052a88081
)
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f h1:zvClvFQwU++UpIUBGC8YmDlfhUrweEy1R1Fj1gu5iIM=
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down Expand Up @@ -679,10 +681,6 @@ github.com/tsuru/go-tsuruclient v0.0.0-20240409125509-22a1e08326f4 h1:MGmG6AxKP8
github.com/tsuru/go-tsuruclient v0.0.0-20240409125509-22a1e08326f4/go.mod h1:qwh/KJ6ypa2GISRI79XFOHhnSjGOe1cZVPHF3nfrf18=
github.com/tsuru/tablecli v0.0.0-20190131152944-7ded8a3383c6 h1:1XDdWFAjIbCSG1OjN9v9KdWhuM8UtYlFcfHe/Ldkchk=
github.com/tsuru/tablecli v0.0.0-20190131152944-7ded8a3383c6/go.mod h1:ztYpOhW+u1k21FEqp7nZNgpWbr0dUKok5lgGCZi+1AQ=
github.com/tsuru/tsuru v0.0.0-20240411165438-543d3861334a h1:O0fPdqtXD4RQXaptD1AjezS/4Ryo5Fxjrm38jKZRYkE=
github.com/tsuru/tsuru v0.0.0-20240411165438-543d3861334a/go.mod h1:QxMVXEjpb6mPnlaLMQdxJ3XCg+vOa4/MwZWLk3/naec=
github.com/tsuru/tsuru v0.0.0-20240426210150-8ecd7f486345 h1:A6SbQLCBGgdJOKoXUrUmiCDVLNyy+cHV3omW9vgua8M=
github.com/tsuru/tsuru v0.0.0-20240426210150-8ecd7f486345/go.mod h1:QxMVXEjpb6mPnlaLMQdxJ3XCg+vOa4/MwZWLk3/naec=
github.com/tsuru/tsuru v0.0.0-20240430173126-10560a3c53fd h1:Al7qvBMn76Pb3Ci3AzULVTNUlv2SIn6MtjrLfbM0dlg=
github.com/tsuru/tsuru v0.0.0-20240430173126-10560a3c53fd/go.mod h1:QxMVXEjpb6mPnlaLMQdxJ3XCg+vOa4/MwZWLk3/naec=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
Expand Down
2 changes: 1 addition & 1 deletion tsuru/admin/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/tsuru/tsuru-client/tsuru/formatter"
tsuruHTTP "github.com/tsuru/tsuru-client/tsuru/http"
check "gopkg.in/check.v1"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"text/template"
"time"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/lnquy/cron"
"github.com/tsuru/gnuflag"
"github.com/tsuru/go-tsuruclient/pkg/config"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strconv"
"strings"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/tsuru/gnuflag"
"github.com/tsuru/go-tsuruclient/pkg/config"
"github.com/tsuru/tsuru-client/tsuru/formatter"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"strings"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/tsuru/tsuru/cmd"
"github.com/tsuru/tsuru/cmd/cmdtest"
"github.com/tsuru/tsuru/io"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"strings"
"time"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/ghodss/yaml"
"github.com/iancoleman/orderedmap"
"github.com/tsuru/gnuflag"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sort"
"strings"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/pkg/errors"
"github.com/tsuru/gnuflag"
"github.com/tsuru/go-tsuruclient/pkg/config"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"strconv"
"strings"

"github.com/ajg/form"
"github.com/antihax/optional"
"github.com/cezarsa/form"
osb "github.com/pmorie/go-open-service-broker-client/v2"
"github.com/tsuru/gnuflag"
"github.com/tsuru/go-tsuruclient/pkg/config"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/http"
"strings"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/tsuru/go-tsuruclient/pkg/tsuru"
tsuruHTTP "github.com/tsuru/tsuru-client/tsuru/http"
"github.com/tsuru/tsuru/cmd"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/tsuru/go-tsuruclient/pkg/config"
"github.com/tsuru/tsuru-client/tsuru/formatter"
tsuruHTTP "github.com/tsuru/tsuru-client/tsuru/http"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sort"
"strings"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/tsuru/gnuflag"
"github.com/tsuru/go-tsuruclient/pkg/config"
"github.com/tsuru/tablecli"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/client/volume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/http"
"strings"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/tsuru/tsuru/cmd"
"github.com/tsuru/tsuru/cmd/cmdtest"
volumeTypes "github.com/tsuru/tsuru/types/volume"
Expand Down
2 changes: 1 addition & 1 deletion tsuru/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/http"
"os"

"github.com/ajg/form"
"github.com/cezarsa/form"
"github.com/pkg/errors"
goTsuruClient "github.com/tsuru/go-tsuruclient/pkg/client"
"github.com/tsuru/go-tsuruclient/pkg/config"
Expand Down

0 comments on commit 643b72b

Please sign in to comment.