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

Update server.go #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update server.go #77

wants to merge 1 commit into from

Conversation

francisco1844
Copy link

As a beginner many, including myself, my use this hello world sample as a starting point to learn and test. However c.String can't be used for much more, at lest for a beginner, than to just do a simple test. Once I started to add lines the rendering was all off. It took me 2 days to find/figure out I had to use c.HTML instead of c.String to output HTML pages. So, perhaps, may be bet to have c.HTML in the hello world instead as to make it easier for newcomers to use the code as a starting point.

As a beginner many, including myself, my use this hello world sample as a starting point to learn and test. However c.String can't be used for much more, at lest for a beginner, than to just do a simple test. Once I started to add lines the rendering was all off. It took me 2 days to find/figure out I had to use c.HTML instead of c.String to output HTML pages. So, perhaps, may be bet to have c.HTML in the hello world instead as to make it easier for newcomers to use the code as a starting point.
@lammel
Copy link
Contributor

lammel commented Dec 6, 2020

I'd prefer to keep minimal examples as simple as possible, so just using a String seems ok to me for that purpose.
It might be better to point to the Rendering docs to help beginners.

But feedback is welcome here.

@pafuent
Copy link
Contributor

pafuent commented Dec 11, 2020

I agree with @lammel, in fact someone else could choose c.JSON instead of c.HTML, which is more common for APIs

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

Successfully merging this pull request may close these issues.

None yet

3 participants