diff options
Diffstat (limited to 'docs/content/en/functions/path.Clean.md')
-rw-r--r-- | docs/content/en/functions/path.Clean.md | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/docs/content/en/functions/path.Clean.md b/docs/content/en/functions/path.Clean.md index 852de65fd..ce53cc9ff 100644 --- a/docs/content/en/functions/path.Clean.md +++ b/docs/content/en/functions/path.Clean.md @@ -1,13 +1,10 @@ --- title: path.Clean description: Replaces path separators with slashes (`/`) and removes extraneous separators. -date: 2021-10-08 -# publishdate: 2018-11-28 -# lastmod: 2018-11-28 categories: [functions] menu: docs: - parent: "functions" + parent: functions keywords: [path, clean] signature: ["path.Clean PATH"] relatedfuncs: [path.Base, path.BaseName, path.Dir, path.Ext, path.Join, path.Split] @@ -15,13 +12,13 @@ relatedfuncs: [path.Base, path.BaseName, path.Dir, path.Ext, path.Join, path.Spl `path.Clean` replaces path separators with slashes (`/`) and removes extraneous separators, including trailing separators. -``` +```go-html-template {{ path.Clean "foo//bar" }} → "foo/bar" {{ path.Clean "/foo/bar/" }} → "/foo/bar" ``` On a Windows system, if `.File.Path` is `foo\bar.md`, then: -``` +```go-html-template {{ path.Clean .File.Path }} → "foo/bar.md" ``` |