diff options
| author | Abin Simon <mail@meain.io> | 2022-12-10 07:37:34 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-10 02:07:34 +0000 |
| commit | deab8fb972f0cbc03c6a5409564435121b5db9c2 (patch) | |
| tree | d6c9545bc54fbcb5a4687c38bddb03a068dcd8b7 /test/formatters/samplecode/goimports | |
| parent | 049b724858c5c6f43a7a0831ddc2d85920dcd0c3 (diff) | |
Add gofumpt and goimports as formatter options (#147)
* Add gofumpt and goimports as formatter options
* Add tests for gofumpt and goimports
* changelog
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
Diffstat (limited to 'test/formatters/samplecode/goimports')
| -rw-r--r-- | test/formatters/samplecode/goimports/in.go | 12 | ||||
| -rw-r--r-- | test/formatters/samplecode/goimports/out.go | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/formatters/samplecode/goimports/in.go b/test/formatters/samplecode/goimports/in.go new file mode 100644 index 0000000..3583cc5 --- /dev/null +++ b/test/formatters/samplecode/goimports/in.go @@ -0,0 +1,12 @@ +package asdfasdf +func + +Factorial(x int) int { + if x <= + 1 { + return x +} + fmt.Println( "Hello there!" ) + return x * Factorial(x - 1, +) + } diff --git a/test/formatters/samplecode/goimports/out.go b/test/formatters/samplecode/goimports/out.go new file mode 100644 index 0000000..e56e679 --- /dev/null +++ b/test/formatters/samplecode/goimports/out.go @@ -0,0 +1,12 @@ +package asdfasdf + +import "fmt" + +func Factorial(x int) int { + if x <= + 1 { + return x + } + fmt.Println("Hello there!") + return x * Factorial(x-1) +} |
