# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/jijbmba
Golang 高效編寫單元測試的技巧之 Mock
在項目中進行單元測試是一種重要的開發實踐。然而,當被測代碼依賴其他模塊或組件時,編寫單元測試變得複雜且不穩定。本文將介紹如何使用 mock 來編寫簡潔高效的單元測試。引言--首先我們先來看下項目中的依賴注入文件cmd/server/wire.go: tip: 該文件由google/wire工具自動編譯生成,禁止人爲編輯// Injectors from wire.go:func newApp(v ⌘ Read more