This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
schisandra-cloud-album/config/conf_system.go
landaiqing 5cc4294268 add session
2024-09-23 13:31:57 +08:00

22 lines
523 B
Go

package config
import "fmt"
// System 系统配置
type System struct {
Host string `yaml:"host"` //主机地址
Port string `yaml:"port"` //端口号
Env string `yaml:"env"` //环境
Protocol string `yaml:"protocol"` //协议
Web string `yaml:"web"` //web地址
Ip string `yaml:"ip"` //ip地址
}
func (s *System) Addr() string {
return fmt.Sprintf("%s:%s", s.Host, s.Port)
}
func (s *System) WebURL() string {
return fmt.Sprintf("%s://%s", s.Protocol, s.Web)
}