-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PL-24913]: Handle the error raised while creating a multipart input #181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of nits but nice simplification.
scm/multipart.go
Outdated
@@ -0,0 +1,26 @@ | |||
package scm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this functionality is only used by stash/content. I would move this helper method in under stash
or
into scm/driver/stash/stash.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since most of the providers uses multipart requests only, the idea is to use this helper function in new APIs. Hence I kept it at a top level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
➜ go-scm git:(no_project) grep -irsn Multipart .
./scm/driver/bitbucket/bitbucket.go:13: "mime/multipart"
./scm/driver/bitbucket/bitbucket.go:74: // add the content to the multipart
./scm/driver/bitbucket/bitbucket.go:77: w := multipart.NewWriter(&b)
./scm/driver/bitbucket/bitbucket.go:95: // write the multipart response to the body
./scm/driver/bitbucket/bitbucket.go:97: // write the content type that contains the length of the multipart
./scm/driver/bitbucket/bitbucket.go:103: writer := multipart.NewWriter(body)
nothing else is using it yet. I would definitely make it only for stash for now. Until another git provider uses it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.