3 Star 5 Fork 3

三三物联网/ssiot-core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
url.go 448 Bytes
一键复制 编辑 原始数据 按行查看 历史
三三物联网 提交于 2022-12-29 09:28 . up
package pkg
import (
"strings"
"github.com/gin-gonic/gin"
)
//获取URL中批量id并解析
func IdsStrToIdsIntGroup(key string, c *gin.Context) []int {
return IdsStrToIdsIntGroupStr(c.Param(key))
}
type Ids struct {
Ids []int
}
func IdsStrToIdsIntGroupStr(keys string) []int {
IDS := make([]int, 0)
ids := strings.Split(keys, ",")
for i := 0; i < len(ids); i++ {
ID, _ := StringToInt(ids[i])
IDS = append(IDS, ID)
}
return IDS
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sansaniot/ssiot-core.git
git@gitee.com:sansaniot/ssiot-core.git
sansaniot
ssiot-core
ssiot-core
v1.4.4

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385