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

set comments to two slashes only for go.mod #3460

Merged
merged 1 commit into from
Oct 30, 2022

Conversation

ArtAndreev
Copy link
Contributor

@ArtAndreev ArtAndreev commented Oct 28, 2022

According to Go Modules Reference: Lexical elements:

Comments start with // and run to the end of a line. /* */ comments are not allowed.

Also go toolchain throws an error if comment of wrong format appears:

$ go mod tidy
go: errors parsing go.mod:
<path>/go.mod:<line>:<column>: mod files must use // comments (not /* */ comments)

This PR sets comments to // only in go.mod (gomod filetype).

Same can be set for go.work file too (Lexical elements), but currently vim-go doesn't provide filetype plugin for it.

@bhcleek
Copy link
Collaborator

bhcleek commented Oct 30, 2022

Thank you

@bhcleek bhcleek added this to the vim-go v1.27 milestone Oct 30, 2022
@bhcleek bhcleek merged commit 833cfcb into fatih:master Oct 30, 2022
bhcleek added a commit that referenced this pull request Oct 30, 2022
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

Successfully merging this pull request may close these issues.

2 participants