mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-25 00:07:36 +02:00
Continued work on Windows CLI
This commit is contained in:
parent
7d473488de
commit
613348d37e
9 changed files with 135 additions and 71 deletions
util
|
@ -183,11 +183,6 @@ func PriorityString(priority int) (string, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// ExpandHome replaces "~" with the user's home directory
|
||||
func ExpandHome(path string) string {
|
||||
return os.ExpandEnv(strings.ReplaceAll(path, "~", "$HOME"))
|
||||
}
|
||||
|
||||
// ShortTopicURL shortens the topic URL to be human-friendly, removing the http:// or https://
|
||||
func ShortTopicURL(s string) string {
|
||||
return strings.TrimPrefix(strings.TrimPrefix(s, "https://"), "http://")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue