Fmt formats and simplifies all Go files.
()
| 152 | |
| 153 | // Fmt formats and simplifies all Go files. |
| 154 | func (g Go) Fmt() error { |
| 155 | dirs, err := g.packageDirs() |
| 156 | if err != nil { |
| 157 | return err |
| 158 | } |
| 159 | if len(dirs) == 0 { |
| 160 | return nil |
| 161 | } |
| 162 | if mg.Verbose() { |
| 163 | fmt.Printf("Formatting and simplifying %d Go packages\n", len(dirs)) |
| 164 | } |
| 165 | return runGoTool(append([]string{gofumpt, "-w"}, dirs...)...) |
| 166 | } |
| 167 | |
| 168 | // Lint lints all Go files. |
| 169 | func (g Go) Lint() error { |
nothing calls this directly
no test coverage detected