mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 18:15:45 +00:00
source: Consolidate filepath.Split calls
This commit is contained in:
1 parent
df44b1930a
commit
21054f730a
1 file changed
+1
-2
+1
-2
@@ -92,8 +92,7 @@ func NewFile(relpath string) *File {
|
||||
relpath: relpath,
|
||||
}
|
||||
|
||||
f.dir, _ = filepath.Split(f.relpath)
|
||||
_, f.logicalName = filepath.Split(f.relpath)
|
||||
f.dir, f.logicalName = filepath.Split(f.relpath)
|
||||
f.ext = strings.TrimPrefix(filepath.Ext(f.LogicalName()), ".")
|
||||
f.section = helpers.GuessSection(f.Dir())
|
||||
f.uniqueID = helpers.Md5String(f.LogicalName())
|
||||
|
||||
Reference in new issue
Block a user