Peiming Wu

Results 8 comments of Peiming Wu

Hi folks, it seems like https://github.com/protobufjs/protobuf.js/pull/1256 has been merged and released, do you have any update about this issue?

I have the same issue using [email protected]. It seems to me that mockery doesn't work well with go 1.14 and 1.15, but with go 1.13 I have no problem.

@lsc36 > Go wiki 建議把 interface 宣告在使用它的 package 而非實作它的 package,這樣可以避免不必要的 dependency 以及未來 refactor 的成本。 同意。不過當初設計 usecase/repository interface 的原因可以去參考一下 #16 ,或許對於初期來說有點 over engineering 但是當初的想法是先把 business 相關的邏輯(利用 interface )定義出來,然後把 database layer (一樣利用...

我覺得要看需求耶, Gin 會不會太 overkill?

沒記錯的話 Gin 有因為包太多東西導致效能有逐漸下降的趨勢,當然也有可能是我誤會了什麼 XD https://www.techempower.com/benchmarks/ 我自己是比較習慣 Gin,但如果只是要用到 routing 的話我會考慮其他的選項,不過要用 Gin 我也是歡迎就是了 XD 另外補充一點, Gin 用的 HTTP routing 如果用 wildcard 的話蠻容易 conflict 的,這部分要留意一下。(其他 framework 也要就是了) 但總是個選項,讓我加上去,感謝!

@Julian-Chu 對,原先我只是想用個 http route 這樣我們就不用自己在那邊刻 parsing 的邏輯。不過既然有人提了 Gin 我覺得也可以一起放進來討論這樣 XD @Markogoodman 就目前我覺得(個人淺見)應該是需要 http router 而已,所以應該就先看哪個 library 效能比較好、易讀跟易維護嗎? ~再不然就是開投票了XD~

> [gin-gonic/gin#2016](https://github.com/gin-gonic/gin/issues/2016) > httprouter在路由設計上好像有某些限制,看到不少抱怨,httprouter也說v2會改正(不過不知道v2何時才來...) > @Markogoodman @asymptoter 你們用起來有感覺嗎(我沒用過httprouter) 我撞到這個很多次 ... XD 不過我感覺滿看 API 設計的,說不定在這個 project 不會撞到

FYR: https://yushuanhsieh.github.io/post/2020-01-21-golang-router/ 這篇有提到: > gin 不允許這樣的 path 設計,其原因 node 中有一個 wildChild member 是用來進行搜尋判斷,而當插入含有 params path 時,這個 wildChild 會被設定成 true,進而導致同一層的 static path child 會變成 unreachable 狀態。