MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Fmt

Method Fmt

tools/mage/go.go:154–166  ·  view source on GitHub ↗

Fmt formats and simplifies all Go files.

()

Source from the content-addressed store, hash-verified

152
153// Fmt formats and simplifies all Go files.
154func (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.
169func (g Go) Lint() error {

Callers

nothing calls this directly

Calls 3

packageDirsMethod · 0.95
runGoToolFunction · 0.85
PrintfMethod · 0.45

Tested by

no test coverage detected