1 Star 0 Fork 0

iotas/toolkit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tpl_func.go 578 Bytes
一键复制 编辑 原始数据 按行查看 历史
xuthus 提交于 4年前 . fix
package proto_parser
import "strings"
// Len 返回字符串长度
func Len(s string) int {
return len([]rune(s))
}
// IsBodyEmpty 是否不需要关心文档返回
func IsBodyEmpty(s string) bool {
if len(s) == 0 || s == "{}" {
return true
}
return false
}
// NotBodyEmpty 是否文档为空
func NotBodyEmpty(s string) bool {
if len(s) == 0 || s == "{}" {
return false
}
return true
}
// IsOuterProjectErrorCode 是否是项目外部的错误码
func IsOuterProjectErrorCode(err string) bool {
if strings.Contains(err, ".") {
return true
}
return false
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/iotas/toolkit.git
git@gitee.com:iotas/toolkit.git
iotas
toolkit
toolkit
6a2c4ec13c63

搜索帮助