diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-10 20:54:45 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-10 20:54:45 +0800 |
commit | 42daa477b3404d5e32c3790d673cbd525e4342e0 (patch) | |
tree | 4ef17152d3f47716ca83674726fd558d03d246ee | |
parent | repo_tree: Fix URL and anchor issues (diff) | |
download | forge-42daa477b3404d5e32c3790d673cbd525e4342e0.tar.gz forge-42daa477b3404d5e32c3790d673cbd525e4342e0.tar.zst forge-42daa477b3404d5e32c3790d673cbd525e4342e0.zip |
template_funcs: base_name should use path, not filepath
-rw-r--r-- | template_funcs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/template_funcs.go b/template_funcs.go index 1c68650..08932ba 100644 --- a/template_funcs.go +++ b/template_funcs.go @@ -1,7 +1,7 @@ package main import ( - "path/filepath" + "path" "strings" ) @@ -11,5 +11,5 @@ func first_line(s string) string { } func base_name (s string) string { - return filepath.Base(s) + return path.Base(s) } |