Skip to content

Commit cab95e8

Browse files
committed
added a comment about the URL shallow copy
1 parent ce1bf98 commit cab95e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/src/code_intel_upload.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ func printInferredArguments(out *output.Output) {
188188
// makeCodeIntelUploadURL constructs a URL to the upload with the given internal identifier.
189189
// The base of the URL is constructed from the configured Sourcegraph instance.
190190
func makeCodeIntelUploadURL(uploadID int) string {
191+
// Careful: copy by dereference makes a shallow copy, so User is not duplicated.
191192
u := *cfg.endpointURL
192193
graphqlID := base64.URLEncoding.EncodeToString(fmt.Appendf(nil, `SCIPUpload:%d`, uploadID))
193194
u.Path = codeintelUploadFlags.repo + "/-/code-intelligence/uploads/" + graphqlID

0 commit comments

Comments
 (0)