1 Star 0 Fork 0

adastudy/ansible_api_go

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.go 710 Bytes
一键复制 编辑 原始数据 按行查看 历史
gaohengda 提交于 2021-04-30 13:42 +08:00 . web api golang
package main
import (
. "web_api_go/apis"
r "web_api_go/cache"
"github.com/gin-gonic/gin"
//m "web_api_go/models"
//"fmt"
//"strconv"
)
func main() {
/*
conn := r.Pool.Get()
conn.Do("set", "test", "333")
err := m.Setdata()
if err != nil {
fmt.Println(err)
}
m.Getdata()
key := "testqueue"
value := "testtasks2"
m.Lpushdata(key, value)
i := 0
for i <= 10 {
m.Lpushdata(key, strconv.Itoa(i))
i++
}
data, err := m.Lpopdata(key)
fmt.Println(data)
/*
err = m.Setdata2()
if err != nil {
fmt.Println(err)
}
*/
defer r.Pool.Close()
router := gin.Default()
router.GET("/", IndexApi)
router.POST("/tasks/:name", PostTasksApi)
router.Run(":8181")
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/adastudy/ansible_api_go.git
git@gitee.com:adastudy/ansible_api_go.git
adastudy
ansible_api_go
ansible_api_go
master

搜索帮助