# 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/cgszooq
在 Gin 中使用中間件進行全局錯誤處理**
3 自定義錯誤結構首先自定義如下錯誤結構體,包含 code、msg 和 data,data 用以提供附加的錯誤信息,比如提示 300 參數錯誤時 data 可提示具體的參數錯誤信息。按照 golang 的接口實現規則,只要 MyError 結構體實現了 Error() string 方法就可被視作實現了標準 error 接口。package errorstype MyError struct { ⌘ Read more