Skip to content

Commit 822788b

Browse files
Paulo Gomesdarkowlzz
authored andcommitted
Fix word casing
Signed-off-by: Paulo Gomes <[email protected]>
1 parent 4ed54bc commit 822788b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

controllers/gitrepository_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (r *GitRepositoryReconciler) reconcileSource(ctx context.Context,
388388
repositoryURL = fmt.Sprintf("http://%s/%s/%d", obj.Name, obj.UID, obj.Generation)
389389
managed.AddTransportOptions(repositoryURL,
390390
managed.TransportOptions{
391-
TargetUrl: obj.Spec.URL,
391+
TargetURL: obj.Spec.URL,
392392
CABundle: authOpts.CAFile,
393393
})
394394

pkg/git/libgit2/managed/http.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ func createClientRequest(targetUrl string, action git2go.SmartServiceAction, t *
147147
finalUrl := targetUrl
148148
opts, found := transportOptions(targetUrl)
149149
if found {
150-
if opts.TargetUrl != "" {
150+
if opts.TargetURL != "" {
151151
// override target URL only if options are found and a new targetURL
152152
// is provided.
153-
finalUrl = opts.TargetUrl
153+
finalUrl = opts.TargetURL
154154
}
155155

156156
// Add any provided certificate to the http transport.

pkg/git/libgit2/managed/managed_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestHttpAction_CreateClientRequest(t *testing.T) {
9292
action: git2go.SmartServiceActionUploadpack,
9393
transport: &http.Transport{},
9494
opts: &TransportOptions{
95-
TargetUrl: "https://final-target",
95+
TargetURL: "https://final-target",
9696
},
9797
wantedErr: nil,
9898
},
@@ -151,12 +151,12 @@ func TestOptions(t *testing.T) {
151151
registerOpts: true,
152152
url: "https://target/?876",
153153
opts: TransportOptions{
154-
TargetUrl: "https://new-target/321",
154+
TargetURL: "https://new-target/321",
155155
CABundle: []byte{123, 213, 132},
156156
},
157157
expectOpts: true,
158158
expectedOpts: &TransportOptions{
159-
TargetUrl: "https://new-target/321",
159+
TargetURL: "https://new-target/321",
160160
CABundle: []byte{123, 213, 132},
161161
},
162162
},
@@ -262,7 +262,7 @@ func TestManagedTransport_E2E(t *testing.T) {
262262
// This was the way found to ensure that the built-in transport was not used.
263263
httpAddress := "http://fake-url"
264264
AddTransportOptions(httpAddress, TransportOptions{
265-
TargetUrl: server.HTTPAddress() + "/" + repoPath,
265+
TargetURL: server.HTTPAddress() + "/" + repoPath,
266266
})
267267

268268
repo, err := git2go.Clone(httpAddress, tmpDir, &git2go.CloneOptions{

pkg/git/libgit2/managed/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
// TransportOptions represents options to be applied at transport-level
2424
// at request time.
2525
type TransportOptions struct {
26-
TargetUrl string
26+
TargetURL string
2727
CABundle []byte
2828
}
2929

0 commit comments

Comments
 (0)