mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 20:52:33 +02:00
fixed out of range error on gotify message being sent
This commit is contained in:
parent
bee26f43d4
commit
cfa74d69ae
1 changed files with 2 additions and 4 deletions
|
@ -9,9 +9,6 @@ import (
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: support other languages.
|
|
||||||
var titleCaser = cases.Title(language.AmericanEnglish)
|
|
||||||
|
|
||||||
func CommaSeperatedList(s string) []string {
|
func CommaSeperatedList(s string) []string {
|
||||||
res := strings.Split(s, ",")
|
res := strings.Split(s, ",")
|
||||||
for i, part := range res {
|
for i, part := range res {
|
||||||
|
@ -21,7 +18,8 @@ func CommaSeperatedList(s string) []string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Title(s string) string {
|
func Title(s string) string {
|
||||||
return titleCaser.String(s)
|
// TODO: support other languages.
|
||||||
|
return cases.Title(language.AmericanEnglish).String(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExtractPort(fullURL string) (int, error) {
|
func ExtractPort(fullURL string) (int, error) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue