Add godot linter to harmonitze toplevel comments (#3650)

This commit is contained in:
Robert Kaussow
2024-05-13 22:58:21 +02:00
committed by GitHub
parent 83eba294c7
commit 89e100cfd1
144 changed files with 302 additions and 302 deletions

View File

@@ -28,6 +28,7 @@ import (
const (
pathLogLevel = "%s/api/log-level"
//nolint:godot
// TODO: implement endpoints
// pathFeed = "%s/api/user/feed"
// pathVersion = "%s/version"
@@ -58,7 +59,7 @@ func (c *client) SetAddress(addr string) {
c.addr = addr
}
// LogLevel returns the current logging level
// LogLevel returns the current logging level.
func (c *client) LogLevel() (*LogLevel, error) {
out := new(LogLevel)
uri := fmt.Sprintf(pathLogLevel, c.addr)
@@ -66,7 +67,7 @@ func (c *client) LogLevel() (*LogLevel, error) {
return out, err
}
// SetLogLevel sets the logging level of the server
// SetLogLevel sets the logging level of the server.
func (c *client) SetLogLevel(in *LogLevel) (*LogLevel, error) {
out := new(LogLevel)
uri := fmt.Sprintf(pathLogLevel, c.addr)
@@ -75,7 +76,7 @@ func (c *client) SetLogLevel(in *LogLevel) (*LogLevel, error) {
}
//
// http request helper functions
// HTTP request helper functions.
//
// Helper function for making an http GET request.
@@ -144,7 +145,7 @@ func (c *client) open(rawurl, method string, in any) (io.ReadCloser, error) {
return resp.Body, nil
}
// mapValues converts a map to url.Values
// mapValues converts a map to `url.Values`.
func mapValues(params map[string]string) url.Values {
values := url.Values{}
for key, val := range params {

View File

@@ -136,9 +136,9 @@ type (
Username string `json:"username"`
Password string `json:"password,omitempty"`
// Deprecated
Email string `json:"email"` // TODO remove in 3.x
Email string `json:"email"` // TODO: remove in 3.x
// Deprecated
Token string `json:"token"` // TODO remove in 3.x
Token string `json:"token"` // TODO: remove in 3.x
}
// Secret represents a secret variable, such as a password or token.
@@ -181,6 +181,8 @@ type (
Commit string `json:"commit,omitempty"`
}
//nolint:godot
// TODO: use dedicated struct in 3.x
// QueueStats struct {
// Workers int `json:"worker_count"`
// Pending int `json:"pending_count"`
@@ -194,7 +196,7 @@ type (
Pending []Task `json:"pending"`
WaitingOnDeps []Task `json:"waiting_on_deps"`
Running []Task `json:"running"`
// TODO use dedicated struct in 3.x
// TODO: use dedicated struct in 3.x
// Stats QueueStats `json:"stats"`
Stats struct {
Workers int `json:"worker_count"`
@@ -211,7 +213,7 @@ type (
Level string `json:"log-level"`
}
// LogEntry is a single log entry
// LogEntry is a single log entry.
LogEntry struct {
ID int64 `json:"id"`
StepID int64 `json:"step_id"`