mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 10:30:13 +01:00
♻️ Extract method util.GetTreeID
This commit is contained in:
parent
c295a496d7
commit
6f7e106be4
11 changed files with 26 additions and 27 deletions
|
|
@ -37,6 +37,10 @@ var (
|
|||
UserAgent = "SiYuan/" + Ver
|
||||
)
|
||||
|
||||
func GetTreeID(treePath string) string {
|
||||
return strings.TrimSuffix(path.Base(treePath), ".sy")
|
||||
}
|
||||
|
||||
func ShortPathForBootingDisplay(p string) string {
|
||||
if 25 > len(p) {
|
||||
return p
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue