File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 7
7
Enforce a stricter format than ` gofmt ` , while being backwards compatible.
8
8
That is, ` gofumpt ` is happy with a subset of the formats that ` gofmt ` is happy with.
9
9
10
- The tool is a fork of ` gofmt ` as of Go 1.19 , and requires Go 1.19 or later.
10
+ The tool is a fork of ` gofmt ` as of Go 1.20 , and requires Go 1.19 or later.
11
11
It can be used as a drop-in replacement to format your Go code,
12
12
and running ` gofmt ` after ` gofumpt ` should produce no changes.
13
13
For example:
14
14
15
15
gofumpt -l -w .
16
16
17
17
Some of the Go source files in this repository belong to the Go project.
18
- The project includes copies of ` go/printer ` and ` go/doc/comment ` as of Go 1.19
18
+ The project includes copies of ` go/printer ` and ` go/doc/comment ` as of Go 1.20
19
19
to ensure consistent formatting independent of what Go version is being used.
20
20
The [ added formatting rules] ( #Added-rules ) are implemented in the ` format ` package.
21
21
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ func (r *reporter) getState() *reporterState {
239
239
240
240
// Warnf emits a warning message to the reporter's error stream,
241
241
// without changing its exit code.
242
- func (r * reporter ) Warnf (format string , args ... interface {} ) {
242
+ func (r * reporter ) Warnf (format string , args ... any ) {
243
243
fmt .Fprintf (r .getState ().err , format , args ... )
244
244
}
245
245
@@ -542,7 +542,7 @@ type module struct {
542
542
}
543
543
}
544
544
545
- func loadModuleInfo (dir string ) interface {} {
545
+ func loadModuleInfo (dir string ) any {
546
546
cmd := exec .Command ("go" , "mod" , "edit" , "-json" )
547
547
cmd .Dir = dir
548
548
You can’t perform that action at this time.
0 commit comments