Skip to content

Add some empty lines for linter sake. For #207#219

Open
eleksir wants to merge 1 commit into
xmppo:masterfrom
eleksir:207.wsl_v5
Open

Add some empty lines for linter sake. For #207#219
eleksir wants to merge 1 commit into
xmppo:masterfrom
eleksir:207.wsl_v5

Conversation

@eleksir

@eleksir eleksir commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@eleksir

eleksir commented Dec 6, 2025

Copy link
Copy Markdown
Contributor Author

Some newlines here and there. It is sometimes enhances readability, but not in all cases.
Say, it is good practice separate var declarations and strings with '=' operator, but if you have mixed strings it can look weird.
Anyway, I also add some empty lines before and after "for{}", before and after 'switch{}', between "case:", before "default:", before and after "if{}" if it is not "if err != nil{}", etc. It comes from perl-folks from my current job and looks convenient.

@mdosch

mdosch commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

I find stuff like this looking awkward:

n, err := d.w.Write(data)

	if err != nil {
		return n, err
	}

Personally I like the style of gofumpt. Maybe there are some different styles to choose from?

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants