From 0402b973f5f479031c5e0cd944b4c28b62e562ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 22 Feb 2022 16:14:55 +0000 Subject: [PATCH] write changelog for v0.3.0 While writing it, I also noticed that the second change for #73, where we now separate ") {" even if there's no empty line, wasn't documented in the README. It now is. --- CHANGELOG.md | 20 ++++++++++++++++++++ README.md | 15 ++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b4262f..664b430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.3.0] - 2022-02-22 + +This is gofumpt's third major release, based on Go 1.18's gofmt. +The jump from Go 1.17's gofmt should bring a noticeable speed-up, +as the tool can now format many files concurrently. +On an 8-core laptop, formatting a large codebase is 4x as fast. + +The following [formatting rules](https://github.com/mvdan/gofumpt#Added-rules) are added: + +* Functions should separate `) {` where the indentation helps readability +* Field lists should not have leading or trailing empty lines + +The following changes are included as well: + +* Generated files are now fully formatted when given as explicit arguments +* Prepare for Go 1.18's module workspaces, which could cause errors +* Import paths sharing a prefix with the current module path are no longer + grouped with standard library imports +* `format.Options` gains a `ModulePath` field per the last bullet point + ## [0.2.1] - 2021-12-12 This bugfix release resolves a number of issues: diff --git a/README.md b/README.md index 98f371d..534b1b6 100644 --- a/README.md +++ b/README.md @@ -63,13 +63,19 @@ func foo() { -Functions using an empty line for readability should use a `) {` line instead +Functions should separate `) {` where the indentation helps readability
example ``` func foo(s string, i int) { + println("bar") +} + +// With an empty line it's slightly better, but still not great. +func bar(s string, + i int) { println("bar") } @@ -81,6 +87,13 @@ func foo(s string, ) { println("bar") } + +// With an empty line it's slightly better, but still not great. +func bar(s string, + i int, +) { + println("bar") +} ```