Ai
1 Star 1 Fork 0

water/goweb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
entity_gofield.go 494 Bytes
一键复制 编辑 原始数据 按行查看 历史
leijmdas 提交于 2025-01-19 14:06 +08:00 . add
package metaentity
import (
"strings"
)
type EntityGofield struct {
GoField string `json:"go_field"`
GoType string `json:"go_type"`
}
func (self EntityGofield) SortField(sortBy string, that EntityGofield) bool {
if i := strings.Compare(self.GoType, that.GoType); i != 0 {
if sortBy == SortByType {
return i > 0
}
return i <= 0
}
if sortBy == SortByType {
return strings.Compare(self.GoField, that.GoField) < 0
}
return strings.Compare(self.GoField, that.GoField) >= 0
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/leijmdas/goweb.git
git@gitee.com:leijmdas/goweb.git
leijmdas
goweb
goweb
v1.6.111

搜索帮助