heiyeluren / xmm

XMM is a high performance third party memory manager for Go environments that is not affected by Gc and guarantees high performance. XMM是一个在Go语言环境中完全自主实现的第三方内存管理库,不依赖于Go本身的任何内存管理能力,纯自主实现能够应对各种场景下大小内存的 分配/释放 工作,能自主构建高性能的 链表/树/哈希表等各类数据结构,能良好完美的逃逸掉Go内置的GC机制,是构建高性能程序基础设施。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

建议把src这一层目录拿掉

bigwhite opened this issue · comments

建议直接将src下面的源码,拿到项目根目录下,这样包的导入路径最后一个分段与module名/包名一致。

另外go.mod中module path改为github.com/heiyeluren/xmm,方便用户go get。

主要设计是为了代码目录简洁,缺点是引用多一个路径~

目前要两个都满足有点难,所以才增加了src目录~ 回头看看如何更好优化,感谢意见!

去掉后(+改一下go.mod),对用户来说使用起来更方便。否则,你的示例程序都无法编译通过。

$go mod tidy
go: finding module for package github.com/heiyeluren/xmm/src
go: downloading github.com/heiyeluren/xmm v0.1.1
go: found github.com/heiyeluren/xmm/src in github.com/heiyeluren/xmm v0.1.1
go: demo imports
	github.com/heiyeluren/xmm/src: github.com/heiyeluren/xmm@v0.1.1: parsing go.mod:
	module declares its path as: xmm
	        but was required as: github.com/heiyeluren/xmm

我fork了一份,改了一下目录结构与go.mod,完美编译你的示例程序。 https://github.com/bigwhite/XMM, 需要pr的话,at 我。

感谢意见~
目前已经修改了 go.mod 还有去掉了src目录~
后面操作建议是:
import( xmm "github.com/heiyeluren/xmm" )
最后xmm要小写哦~

然后可以:
go get github.com/heiyeluren/xmm

就可以在你程序里顺利使用 XMM 啦~ 感谢

👍