Skip to content
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

Modify #310

Merged
merged 3 commits into from Apr 26, 2020
Merged

Modify #310

merged 3 commits into from Apr 26, 2020

Conversation

bestgopher
Copy link
Contributor

for i := range bodies {
		switch body := bodies[i].(type) {
		case string:
			ctx.Fasthttp.Response.AppendBodyString(body)
		case []byte:
			ctx.Fasthttp.Response.AppendBodyString(getString(body))
		default:
			ctx.Fasthttp.Response.AppendBodyString(fmt.Sprintf("%v", body))
		}
	}

This code block is implemented in the ctx.Write method, so there is no need to implement again.

fix: ctx.Write(bodies...)
@thomasvvugt thomasvvugt added this to In progress in Development Apr 26, 2020
Copy link
Contributor

@thomasvvugt thomasvvugt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bestgopher ,
Thanks for your pull request, it looks good to me.
Good grammar catch, thanks!

Development automation moved this from In progress to Reviewer approved Apr 26, 2020
@Fenny Fenny merged commit 101e1cc into gofiber:master Apr 26, 2020
Development automation moved this from Reviewer approved to Done Apr 26, 2020
@Fenny Fenny mentioned this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants