refactor: clean up verbose and redundant comments
Trim or remove comments that: - State the obvious (function names already convey purpose) - Repeat what the code clearly shows - Are excessively long without adding value Keep comments that explain *why*, not *what*.
This commit is contained in:
parent
805e7ffdc2
commit
5b942a5fd6
11 changed files with 16 additions and 102 deletions
|
|
@ -20,18 +20,15 @@ package contracts
|
|||
type OutputFormat string
|
||||
|
||||
const (
|
||||
FormatHTML OutputFormat = "html" // accepted for compatibility (not yet implemented)
|
||||
FormatHTML OutputFormat = "html" // accepted for compatibility
|
||||
FormatJSON OutputFormat = "json"
|
||||
FormatCSV OutputFormat = "csv"
|
||||
FormatRSS OutputFormat = "rss"
|
||||
)
|
||||
|
||||
type SearchRequest struct {
|
||||
// Format is what the client requested via `format=...`.
|
||||
Format OutputFormat
|
||||
|
||||
Query string
|
||||
|
||||
Format OutputFormat
|
||||
Query string
|
||||
Pageno int
|
||||
Safesearch int
|
||||
TimeRange *string
|
||||
|
|
@ -39,16 +36,14 @@ type SearchRequest struct {
|
|||
TimeoutLimit *float64
|
||||
Language string
|
||||
|
||||
// Engines and categories are used for deciding which engines run locally vs are proxied.
|
||||
// For now, engines can be supplied directly via the `engines` form parameter.
|
||||
// Engines and categories decide which engines run locally vs proxy to upstream.
|
||||
Engines []string
|
||||
Categories []string
|
||||
|
||||
// EngineData matches the `engine_data-<engine>-<key>=<value>` parameters.
|
||||
EngineData map[string]map[string]string
|
||||
|
||||
// AccessToken is an optional request token used to gate paid/limited engines.
|
||||
// It is not part of the upstream JSON schema; it only influences local engines.
|
||||
// AccessToken gates paid/limited engines. Not part of upstream JSON schema.
|
||||
AccessToken string
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue