init project

This commit is contained in:
yanghao05
2023-01-28 11:09:11 +08:00
parent 11a561bdd7
commit 114c003b2b
38 changed files with 2011 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package config
import "fmt"
type Http struct {
Static string
Host string
Port uint
Https bool
HttpsCert string
HttpKey string
}
func (h Http) Address() string {
return fmt.Sprintf("%s:%d", h.Host, h.Port)
}
func (h Http) PortString() string {
return fmt.Sprintf(":%d", h.Port)
}