Ai
1 Star 0 Fork 0

叶明志/golang练习

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
instance.go 352 Bytes
一键复制 编辑 原始数据 按行查看 历史
yemingzhi 提交于 2019-07-07 00:35 +08:00 . 负载均衡balance库的修改
package balance
import(
"strconv"
)
type Instance struct{
Host string
Port int
}
func (p *Instance) NewInstance(host string,port int){
p.Host=host
p.Port=port
}
func (p *Instance) GetHost() string{
return p.Host
}
func (p *Instance) GetPost() int{
return p.Port
}
func (p *Instance) String() string{
return p.Host+":"+strconv.Itoa(p.Port)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/yemingzhi/GolangLearnPractice1.git
git@gitee.com:yemingzhi/GolangLearnPractice1.git
yemingzhi
GolangLearnPractice1
golang练习
2bf136849dce

搜索帮助