7days-golang icon indicating copy to clipboard operation
7days-golang copied to clipboard

7 days golang programs from scratch (web framework Gee, distributed cache GeeCache, object relational mapping ORM framework GeeORM, rpc framework GeeRPC etc) 7天用Go动手写/从零实现系列

Results 52 7days-golang issues
Sort by recently updated
recently updated
newest added

gee-web day1 的 base3 run main.go 遇到找不到 package gee 的问题: ![373356eec6e8f4fc4b39b2e05fb0905](https://user-images.githubusercontent.com/18243223/183689999-a7f02c5e-fce8-4e8c-a91c-00198d4941a7.jpg) 这是我的 go env: ![image](https://user-images.githubusercontent.com/18243223/183690309-d53e7d25-f771-4d13-ae60-10dd0d1c71be.png) google 了一下,好像要把当前项目的路径加到 gopath 去,但这样好像有点蠢(如果每个导入自己写的 package 都要这么做的话)? 请问有什么优雅的解决方案吗?

### Q1:类似var _ PeerPicker = (*HTTPPool)(nil)这种设计目的是什么 参考:[类似var _ PeerPicker = (*HTTPPool)(nil)这种设计目的是什么](https://github.com/geektutu/7days-golang/issues/10) 相关讨论贴:[blog#73](https://github.com/geektutu/blog/issues/73) [blog#68](https://github.com/geektutu/blog/issues/68) ### Q2:接口型函数的使用场景: 参考:[接口型函数的使用场景](https://geektutu.com/post/7days-golang-q1.html) 相关讨论贴:[blog#64](https://github.com/geektutu/blog/issues/64)

https://geektutu.com/post/gee-day5.html 这里已经是day5-middleware的部分了,但是文章中的示例代码还是把代母所处的存放路径写成了day4-group。 希望能够更严谨些,纠正一下这个错误。

第 51 行 if view, err := gee.Get("unknown"); err == nil 应该是 err != nil 吧

已经实现: - 第一期:模仿 gin 的 web 框架 [gee](https://geektutu.com/post/gee.html) - 第二期:模仿 groupcache 的 分布式缓存 [geecache](https://geektutu.com/post/geecache.html) - 第三期:模仿 gorm 的 orm 框架 [geeorm](https://geektutu.com/post/geeorm.html) - 第四期:参考 net/rpc 的 rpc 框架 [geerpc](https://geektutu.com/post/geerpc.html) 实现中: -...

想问下http的rpc和tcp的rpc有啥区别。 看完http rpc,感觉流程是通过向server(给server发一个connect的http请求),得到client(包含了tcp conn),然后就是发rpc数据。 服务端:实现serveHTTP方法,然后就是handleHTTP,进入serveHTTP,先检查http请求是不是connect,然后就到了原来的serveConn, 就感觉这http和tcp的rpc没有啥区别,希望大佬可以解答一下。

大佬能出一个用gin+vue制作一个blog的教程吗,非常期待,感觉大佬的文章系统有逻辑,容易学习

https://github.com/geektutu/7days-golang/blob/cf3644382101dc13e7fd92e8f5c66cabc51bcd3b/gee-rpc/day3-service/service.go#L75 这里只检验了reply Argument是否为导出/内置类型, 没有检验其是否为指针 按照net/rpc的接口, 这是无法Register进入services的 是否应该加上检查是否为指针的操作?

作者能否考虑简单实现一个Docker囊?