5 Star 1 Fork 0

Gitee 极速下载/micro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/micro/micro
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sort.go 389 Bytes
一键复制 编辑 原始数据 按行查看 历史
Asim Aslam 提交于 2017-03-28 00:49 +08:00 . prettify command dir
package cli
import (
"github.com/micro/go-micro/registry"
)
type sortedServices struct {
services []*registry.Service
}
func (s sortedServices) Len() int {
return len(s.services)
}
func (s sortedServices) Less(i, j int) bool {
return s.services[i].Name < s.services[j].Name
}
func (s sortedServices) Swap(i, j int) {
s.services[i], s.services[j] = s.services[j], s.services[i]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/micro.git
git@gitee.com:mirrors/micro.git
mirrors
micro
micro
v0.7.1

搜索帮助