@@ -458,8 +458,8 @@ func decodeUploadPayload(resp *http.Response, body []byte, target *int) (bool, e
458458func makeUploadURL (opts uploadRequestOptions ) (* url.URL , error ) {
459459 qs := url.Values {}
460460
461- if opts .SourcegraphInstanceOptions . GitHubToken != "" {
462- qs .Add ("github_token" , opts .SourcegraphInstanceOptions . GitHubToken )
461+ if opts .GitHubToken != "" {
462+ qs .Add ("github_token" , opts .GitHubToken )
463463 }
464464 if opts .GitLabToken != "" {
465465 qs .Add ("gitlab_token" , opts .GitLabToken )
@@ -471,13 +471,13 @@ func makeUploadURL(opts uploadRequestOptions) (*url.URL, error) {
471471 qs .Add ("commit" , opts .Commit )
472472 }
473473 if opts .Root != "" {
474- qs .Add ("root" , opts .UploadRecordOptions . Root )
474+ qs .Add ("root" , opts .Root )
475475 }
476- if opts .UploadRecordOptions . Indexer != "" {
477- qs .Add ("indexerName" , opts .UploadRecordOptions . Indexer )
476+ if opts .Indexer != "" {
477+ qs .Add ("indexerName" , opts .Indexer )
478478 }
479- if opts .UploadRecordOptions . IndexerVersion != "" {
480- qs .Add ("indexerVersion" , opts .UploadRecordOptions . IndexerVersion )
479+ if opts .IndexerVersion != "" {
480+ qs .Add ("indexerVersion" , opts .IndexerVersion )
481481 }
482482 if opts .UploadRecordOptions .AssociatedIndexID != nil {
483483 qs .Add ("associatedIndexId" , formatInt (* opts .UploadRecordOptions .AssociatedIndexID ))
@@ -499,12 +499,12 @@ func makeUploadURL(opts uploadRequestOptions) (*url.URL, error) {
499499 qs .Add ("done" , "true" )
500500 }
501501
502- path := opts .SourcegraphInstanceOptions . Path
502+ path := opts .Path
503503 if path == "" {
504504 path = "/.api/scip/upload"
505505 }
506506
507- parsedUrl , err := url .Parse (opts .SourcegraphInstanceOptions . SourcegraphURL + path )
507+ parsedUrl , err := url .Parse (opts .SourcegraphURL + path )
508508 if err != nil {
509509 return nil , err
510510 }
0 commit comments