echox
echox copied to clipboard
Update server.go
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.
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.
I agree with @lammel, in fact someone else could choose c.JSON instead of c.HTML, which is more common for APIs