Debian Codegraph @

docs/content/en/functions/path/Ext.md

raw
1 ---
2 title: path.Ext
3 description: Returns the file extension of the given path, after replacing path separators with slashes (`/`).
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 aliases: []
9 returnType: string
10 signatures: [path.Ext PATH]
11 aliases: [/functions/path.ext]
12 ---
13
14 The extension is the suffix beginning at the final dot in the final slash-separated element of path; it is empty if there is no dot.
15
16 ```go-html-template
17 {{ path.Ext "a/b/c/news.html" }} → .html
18 ```