- 博客(5)
- 收藏
- 关注
原创 golang 双向链表的实现增删查改+ 双指针双向查找
package main import ( "context" //"time" //"context" //"container/list" "fmt" ) //这是一个node的 构造函数 func nodeCreater(val string) *node { return &node{ val: val, } } //双向链表 type node struct { val string prev *node next *node } //普通遍历由head
2020-12-30 21:11:29
238
原创 golang 数据结构:单链表 反转 +增删查改
package main import ( "fmt" ) type student struct { val string next *student } //插入节点的时候使用 type stuCreater func(string) *student //打印 func (s *student) trans() { for s != nil { fmt.Println(*s) s = s.next } } //插入节点的时候回调, 也是构造函数 func thisCrea
2020-12-29 15:21:47
190
原创 golang 编译环境问题 liteIDE+gocode 持续更新,有就更新。
功能上 主要是和代码联想,补全相关,如果你的补全和联想有任何问题,就是gocode 的问题 日常中遇到的问题FAQ Q、电脑休眠之后环境就不好用了,联想消失,补全消失 A:重启gocode Q 使用gomod 之后无法联想到项目vendor A: 本质上来说, gocode 不会主动找你的项目vendor路径,除非你主动设置(详见下面配置项 github搬运) gocode只根据以前存在的环境变量搜索GOPATH/pkg/GOPATH/pkg/GOPATH/pkg/GOOS_GOARCH和GOARCH和G
2020-11-01 11:20:10
704
原创 golang gin binding.JSON undefined
func bindWithHandler(c *gin.Context) { a := FormA{} b := FormB{} if err := c.A(&a, binding.JSON); err == nil { c.String(http.StatusOK, `FormA{} 接收成功`) } else if err := c.ShouldBindBodyWith(&b, binding.JSON); err == nil { //这里undefined bingin
2020-10-27 20:13:20
1179
原创 liteIDE 用了 go mod 之后的烦恼.. 不识别vendor,gocode 的联想也没了
liteIDE X 无法正确联想vendor中的gin包 问题描述: 如题 原因分析: liteIDE对go mod 支持不好, 需要下载最新版本解决问题 解决方案: 下载: https://sourceforge.net/projects/liteide/files/x37.3/
2020-10-20 16:12:35
1738
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人