提供管理界面的HTTP/HTTPS修改功能

This commit is contained in:
GoEdgeLab
2020-10-15 16:41:32 +08:00
parent 9c9fbcd45d
commit c5b48bd3f8
34 changed files with 596 additions and 73 deletions

15
internal/utils/strings.go Normal file
View File

@@ -0,0 +1,15 @@
package utils
import "strings"
// format address
func FormatAddress(addr string) string {
if strings.HasSuffix(addr, "unix:") {
return addr
}
addr = strings.Replace(addr, " ", "", -1)
addr = strings.Replace(addr, "\t", "", -1)
addr = strings.Replace(addr, "", ":", -1)
addr = strings.TrimSpace(addr)
return addr
}