# 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/bkxxwea
使用 Go 編寫乾淨的代碼:接受接口並返回結構**
編寫乾淨且可維護的代碼是軟件開發的關鍵方面。乾淨代碼的關鍵原則之一是接受接口並返回結構。本文探討了如何在 Go 中實現這一原則,以 UserRepository 爲例。接受接口和返回結構的好處------------通過接受接口和返回結構,我們在 Go 代碼中實現了多個好處。遵循此原則使 Go 代碼更加整潔、可維護和靈活:1. 解耦:實現可以輕鬆替換,而不影響代碼的其他部分。 2. 可測試性 ⌘ Read more