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

ignore hard-tabs in code block #17

Closed
liyongjing opened this issue Apr 23, 2016 · 2 comments
Closed

ignore hard-tabs in code block #17

liyongjing opened this issue Apr 23, 2016 · 2 comments

Comments

@liyongjing
Copy link

for example

func main() {
    r := gin.Default()
    r.GET("/", func(c *gin.Context) {
        c.String(http.StatusOK, "Hello from %v", "Gin")
    })

    r.Run(":3000")
}
@DavidAnson
Copy link
Owner

In my mind, hard tabs are a problem because no two tools agree on how many spaces they should be. For example here on GitHub, they've converted the tabs in your example to 4 spaces, though it's common to see 8-space or 2-space tabs. Because of this, I consider tabs equally problematic inside code blocks as they are outside and I think this warning is correct to fire inside a code block.

Does that seem reasonable?

@wiryls
Copy link

wiryls commented Apr 10, 2018

@DavidAnson Sorry to bother you. The explanation is very reasonable.
But go recommends tabs instead of spaces. And almost all go projects are using tabs (in 2016).

Waiting for #82 being resolved in the future :-)

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

No branches or pull requests

3 participants