@@ -241,56 +241,56 @@ func TestFetchGitHubRepoFromRemote(t *testing.T) {
241241 }
242242}
243243
244- func TestParseUrl (t * testing.T ) {
244+ func TestParseURL (t * testing.T ) {
245245 t .Parallel ()
246246 for _ , test := range []struct {
247247 name string
248- remoteUrl string
248+ remoteURL string
249249 wantRepo * Repository
250250 wantErr bool
251251 wantErrSubstr string
252252 }{
253253 {
254254 name : "Valid HTTPS URL" ,
255- remoteUrl : "https://github.com/owner/repo.git" ,
255+ remoteURL : "https://github.com/owner/repo.git" ,
256256 wantRepo : & Repository {Owner : "owner" , Name : "repo" },
257257 wantErr : false ,
258258 },
259259 {
260260 name : "Valid HTTPS URL without .git" ,
261- remoteUrl : "https://github.com/owner/repo" ,
261+ remoteURL : "https://github.com/owner/repo" ,
262262 wantRepo : & Repository {Owner : "owner" , Name : "repo" },
263263 wantErr : false ,
264264 },
265265 {
266266 name : "Invalid URL scheme" ,
267- remoteUrl : "http://github.com/owner/repo.git" ,
267+ remoteURL : "http://github.com/owner/repo.git" ,
268268 wantErr : true ,
269269 wantErrSubstr : "not a GitHub remote" ,
270270 },
271271 {
272272 name : "URL with extra path components" ,
273- remoteUrl : "https://github.com/owner/repo/pulls" ,
273+ remoteURL : "https://github.com/owner/repo/pulls" ,
274274 wantRepo : & Repository {Owner : "owner" , Name : "repo" },
275275 wantErr : false ,
276276 },
277277 } {
278278 t .Run (test .name , func (t * testing.T ) {
279279 t .Parallel ()
280- repo , err := ParseURL (test .remoteUrl )
280+ repo , err := ParseURL (test .remoteURL )
281281
282282 if test .wantErr {
283283 if err == nil {
284- t .Errorf ("ParseUrl () err = nil, want error containing %q" , test .wantErrSubstr )
284+ t .Errorf ("ParseURL () err = nil, want error containing %q" , test .wantErrSubstr )
285285 } else if ! strings .Contains (err .Error (), test .wantErrSubstr ) {
286- t .Errorf ("ParseUrl () err = %v, want error containing %q" , err , test .wantErrSubstr )
286+ t .Errorf ("ParseURL () err = %v, want error containing %q" , err , test .wantErrSubstr )
287287 }
288288 } else {
289289 if err != nil {
290- t .Errorf ("ParseUrl () err = %v, want nil" , err )
290+ t .Errorf ("ParseURL () err = %v, want nil" , err )
291291 }
292292 if diff := cmp .Diff (test .wantRepo , repo ); diff != "" {
293- t .Errorf ("ParseUrl () repo mismatch (-want +got): %s" , diff )
293+ t .Errorf ("ParseURL () repo mismatch (-want +got): %s" , diff )
294294 }
295295 }
296296 })
0 commit comments