随笔分类 -  golang

飞书机器人
摘要:package main import ( "net/http" "strings" ) func Send(Webhook string) { contentType := "application/json" data := `{ "msg_type": "interactive", "card 阅读全文

posted @ 2022-06-25 17:19 裤裆内隐藏杀气 阅读(180) 评论(0) 推荐(0)

通过原生SQL判断数据是否存在
摘要:func (s *service) existMongodb(DBInstanceId string) (bool, error) { var DbInstanceDescription string err := s.db.QueryRow("SELECT db_instance_descript 阅读全文

posted @ 2021-09-18 09:46 裤裆内隐藏杀气 阅读(125) 评论(0) 推荐(0)

使用http 构建API接口
摘要:package main import ( "encoding/json" "fmt" "log" "net/http" "github.com/julienschmidt/httprouter" ) func Index(w http.ResponseWriter, r *http.Request 阅读全文

posted @ 2021-07-29 10:34 裤裆内隐藏杀气 阅读(275) 评论(0) 推荐(0)

导航