all: Format code with gofumpt

See https://github.com/mvdan/gofumpt
This commit is contained in:
Bjørn Erik Pedersen
2020-12-02 13:23:25 +01:00
parent 32471b57bd
commit d90e37e0c6
442 changed files with 1426 additions and 2254 deletions

View File

@@ -96,7 +96,7 @@ func (a *asciidocConverter) getAsciidocContent(src []byte, ctx converter.Documen
}
func (a *asciidocConverter) parseArgs(ctx converter.DocumentContext) []string {
var cfg = a.cfg.MarkupConfig.AsciidocExt
cfg := a.cfg.MarkupConfig.AsciidocExt
args := []string{}
args = a.appendArg(args, "-b", cfg.Backend, asciidocext_config.CliDefault.Backend, asciidocext_config.AllowedBackend)
@@ -137,7 +137,6 @@ func (a *asciidocConverter) parseArgs(ctx converter.DocumentContext) []string {
file := filepath.Base(ctx.Filename)
if a.cfg.Cfg.GetBool("uglyUrls") || file == "_index.adoc" || file == "index.adoc" {
outDir, err = filepath.Abs(filepath.Dir(filepath.Join(destinationDir, ctx.DocumentName)))
} else {
postDir := ""
page, ok := ctx.Document.(pageSubset)

View File

@@ -246,7 +246,6 @@ func TestAsciidoctorAttributes(t *testing.T) {
c.Assert(args[2], qt.Equals, "-a")
c.Assert(expectedValues[args[3]], qt.Equals, true)
c.Assert(args[4], qt.Equals, "--no-header-footer")
}
func TestConvert(t *testing.T) {