tpl: Use consistent delimiter spacing in examples

This commit is contained in:
Joe Mooring
2022-11-24 21:24:18 -08:00
committed by Bjørn Erik Pedersen
parent 75f782a5a7
commit b8d5c378ba
6 changed files with 41 additions and 41 deletions

View File

@@ -46,11 +46,11 @@ func init() {
ns.AddMethodMapping(ctx.Join,
nil,
[][2]string{
{fmt.Sprintf(`{{ slice %q "filename.txt" | path.Join }}`, testDir), `my/path/filename.txt`},
{`{{ path.Join "my" "path" "filename.txt" }}`, `my/path/filename.txt`},
{fmt.Sprintf(`{{ %q | path.Ext }}`, testFile), `.txt`},
{fmt.Sprintf(`{{ %q | path.Base }}`, testFile), `filename.txt`},
{fmt.Sprintf(`{{ %q | path.Dir }}`, testFile), `my/path`},
{fmt.Sprintf(`{{ slice %q "filename.txt" | path.Join }}`, testDir), `my/path/filename.txt`},
{`{{ path.Join "my" "path" "filename.txt" }}`, `my/path/filename.txt`},
{fmt.Sprintf(`{{ %q | path.Ext }}`, testFile), `.txt`},
{fmt.Sprintf(`{{ %q | path.Base }}`, testFile), `filename.txt`},
{fmt.Sprintf(`{{ %q | path.Dir }}`, testFile), `my/path`},
},
)