Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

Use io reader for GetFormatPatch #105

Merged
merged 1 commit into from
Jan 7, 2018
Merged

Use io reader for GetFormatPatch #105

merged 1 commit into from
Jan 7, 2018

Conversation

lunny
Copy link
Member

@lunny lunny commented Jan 6, 2018

As title.

@strk
Copy link
Member

strk commented Jan 6, 2018

How about naming the new function GetFormatPatchReader and keep the old signature ?
Also I think it would be worth adding a GetPatchReader to go with the GetPatch one, and test all of them.

@lunny
Copy link
Member Author

lunny commented Jan 6, 2018

@strk GetFormatPatch is unnecessary I think.

@strk
Copy link
Member

strk commented Jan 6, 2018

It would be for consistency with GetPatch. Consistency in naming is important, IMHO, and you don't want to change API of GetPatch.

@strk
Copy link
Member

strk commented Jan 6, 2018

but ok if you just want to rename to GetFormatPatchReader and not provide GetFormatPatch...

@lunny lunny merged commit f4a9105 into go-gitea:master Jan 7, 2018
@lunny lunny deleted the lunny/GetFormatPatch_Reader branch January 7, 2018 06:11
@strk
Copy link
Member

strk commented Jan 7, 2018

Why did you not rename the method ?
Note that Macaron wants a ReadSeeker, so the Reader from this changed method is not good to be passed to ServeContent (lacks Seek)

@strk
Copy link
Member

strk commented Jan 7, 2018

nevermind, fixed via io.Copy as suggested on IRC

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants