refactor: refactor archirecture
This commit is contained in:
parent
b27f7773ca
commit
0281eea177
15 changed files with 295 additions and 249 deletions
16
pkg/formatter/http_domain.go
Normal file
16
pkg/formatter/http_domain.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package formatter
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func ToDomainAndHttpPort(domain string) string {
|
||||
elements := strings.Split(domain, ":")
|
||||
|
||||
if len(elements) == 1 {
|
||||
return fmt.Sprintf("%s:443", elements[0])
|
||||
}
|
||||
|
||||
return domain
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue