# 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/i53ywza
Go 如何編寫出可測試的代碼**
之前寫了幾篇文章,介紹在 Go 中如何編寫測試代碼,以及如何解決被測試代碼中的外部依賴問題。但其實在編寫測試代碼之前,還有一個很重要的點,容易被忽略,就是什麼樣的代碼是可測試的代碼?爲了更方便的編寫測試,我們在編碼階段就應該要考慮到,自己寫出來的代碼是否能夠被測試。本文就來聊一聊在 Go 中如何寫出可測試的代碼。本文不講理論,只講我在實際開發過程中的經驗和思考,使用幾個實際的案例,來演示怎樣從根上 ⌘ Read more