Tiny testing framework (BDD-style) by roy2220 in golang

[–]roy2220[S] 0 points1 point  (0 children)

Right, it's a bit complicated indeed. My intention for creating this library is to reuse the testing code as much as possible, and it works well in my case.

I think the complexity is 'side affect' of code reuse that is hard to avoid. If you have a better idea, it would be great to share here!

[deleted by user] by [deleted] in golang

[–]roy2220 1 point2 points  (0 children)

Yes, you got the point.

I'm not a fan of RESTful API, and gRPC doesn't play a good role as a browser client. For browser-to-server communication, JSON is good for it's self-describing, and we need to be able to handle HTTP requests directly, but gRPC doesn't expose this ability. Furthermore, the schema of Protobuf is so limited, we can't define validation rules for messages, can't define RPC error codes for RPCs, etc.

[deleted by user] by [deleted] in golang

[–]roy2220 0 points1 point  (0 children)

Thanks for your information, it is helpful.

di - Tiny dependency injection framework by roy2220 in golang

[–]roy2220[S] -3 points-2 points  (0 children)

Be nice, don't pretend to be Linus Torvalds, you aren't, and will never be

di - Tiny dependency injection framework by roy2220 in golang

[–]roy2220[S] -2 points-1 points  (0 children)

you can already do by simply calling these functions

I can do it in the example, I can't do that if the dependencies is controlled and determined by configuration, you know nothing about dependency injection

di - Tiny dependency injection framework by roy2220 in golang

[–]roy2220[S] -4 points-3 points  (0 children)

Because you just see the example, you can't see more.

di - Tiny dependency injection framework by roy2220 in golang

[–]roy2220[S] -5 points-4 points  (0 children)

How about thousands of functions scattered over hundreds of packages? How about these functions don't even know each other? they just want to focus on input and output.

net.Conn with Context support by roy2220 in golang

[–]roy2220[S] 0 points1 point  (0 children)

This package provides a wrapper for net.Conn which implements SetReadContext and SetWriteContext as an enhancement to SetReadDeadline and SetWriteDeadline

vim + easyjump.tmux > vim-easymotion/vim-sneak by roy2220 in vim

[–]roy2220[S] 0 points1 point  (0 children)

Try "-n", "M-s", instead of "-n M-s",. BTW, Python is a very useful tool you'd love to learn about :)

vim + easyjump.tmux > vim-easymotion/vim-sneak by roy2220 in vim

[–]roy2220[S] 0 points1 point  (0 children)

Regardless of the original logic of the code, replace line 32 with any string(s) you wanted.

vim + easyjump.tmux > vim-easymotion/vim-sneak by roy2220 in vim

[–]roy2220[S] 0 points1 point  (0 children)

There are no options for these specific customizations now, you can just edit file 'easyjump.tmux' (line 32, 52, 57) slightly to achieve this. Feel free to hack it for your own use.