Golang monkey patching

后端 未结 3 1587
悲哀的现实
悲哀的现实 2020-12-10 13:59

I understand that if go code is structured such that it\'s programmed to interfaces, it\'s trivial to mock; however, I\'m working with a code base that I cannot change (that

3条回答
  •  佛祖请我去吃肉
    2020-12-10 14:12

    There is an available monkey patching library for Go. It only works for Intel/AMD systems (targeting OSX and Ubuntu in particular).

提交回复
热议问题