# 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/lbp6fqa
Gin 參數綁定和校驗精簡版**
說明--在 gin 框架中我們需要對請求提交過來的參數進行合法性校驗,那很多開發者在判斷參數是否合法校驗時會寫很多 if else 邏輯,如果參數非常多,那麼這樣寫起來非常不優雅,那麼優雅的方式是什麼呢?請看以下代碼註釋。代碼--entity.go// 接受驗證碼參數structtype VerifyCodeParams struct { Uid int json:"uid ⌘ Read more