1
0
Fork 0
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:
Philipp Heckel 2022-05-09 16:22:52 -04:00
parent 7d473488de
commit 613348d37e
9 changed files with 135 additions and 71 deletions

View file

@ -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://")