summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/path.Split.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/functions/path.Split.md')
-rw-r--r--docs/content/en/functions/path.Split.md10
1 files changed, 2 insertions, 8 deletions
diff --git a/docs/content/en/functions/path.Split.md b/docs/content/en/functions/path.Split.md
index 7737b77d3..aa915788e 100644
--- a/docs/content/en/functions/path.Split.md
+++ b/docs/content/en/functions/path.Split.md
@@ -1,19 +1,13 @@
---
title: path.Split
description: Split path immediately following the final slash.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, split]
signature: ["path.Split PATH"]
-workson: []
-hugoversion: "0.39"
relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Dir, path.Ext, path.Join]
-deprecated: false
---
`path.Split` splits `PATH` immediately following the final slash, separating it into a directory and a base component.
@@ -23,7 +17,7 @@ If there is no slash in `PATH`, it returns an empty directory and the base is se
**Note:** On Windows, `PATH` is converted to slash (`/`) separators.
-```
+```go-html-template
{{ $dirFile := path.Split "a/news.html" }} → $dirFile.Dir → "a/", $dirFile.File → "news.html"
{{ $dirFile := path.Split "news.html" }} → $dirFile.Dir → "", $dirFile.File → "news.html"
{{ $dirFile := path.Split "a/b/c" }} → $dirFile.Dir → "a/b/", $dirFile.File → "c"