mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
chore: format Go more aggressively
This commit is contained in:
@ -96,7 +96,7 @@ func (c *Client) Tokens(ctx context.Context, userID string) ([]APIKey, error) {
|
||||
if res.StatusCode > http.StatusOK {
|
||||
return nil, ReadBodyAsError(res)
|
||||
}
|
||||
var apiKey = []APIKey{}
|
||||
apiKey := []APIKey{}
|
||||
return apiKey, json.NewDecoder(res.Body).Decode(&apiKey)
|
||||
}
|
||||
|
||||
|
@ -432,13 +432,11 @@ const (
|
||||
// ExperimentExample Experiment = "example"
|
||||
)
|
||||
|
||||
var (
|
||||
// ExperimentsAll should include all experiments that are safe for
|
||||
// users to opt-in to via --experimental='*'.
|
||||
// Experiments that are not ready for consumption by all users should
|
||||
// not be included here and will be essentially hidden.
|
||||
ExperimentsAll = Experiments{ExperimentTemplateEditor}
|
||||
)
|
||||
// ExperimentsAll should include all experiments that are safe for
|
||||
// users to opt-in to via --experimental='*'.
|
||||
// Experiments that are not ready for consumption by all users should
|
||||
// not be included here and will be essentially hidden.
|
||||
var ExperimentsAll = Experiments{ExperimentTemplateEditor}
|
||||
|
||||
// Experiments is a list of experiments that are enabled for the deployment.
|
||||
// Multiple experiments may be enabled at the same time.
|
||||
|
@ -165,7 +165,6 @@ func (c *Client) TemplateVersionByOrganizationAndName(ctx context.Context, organ
|
||||
fmt.Sprintf("/api/v2/organizations/%s/templates/%s/versions/%s", organizationID.String(), templateName, versionName),
|
||||
nil,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return TemplateVersion{}, xerrors.Errorf("execute request: %w", err)
|
||||
}
|
||||
|
@ -39,10 +39,12 @@ type TransitionStats struct {
|
||||
P95 *int64 `example:"146"`
|
||||
}
|
||||
|
||||
type TemplateBuildTimeStats map[WorkspaceTransition]TransitionStats
|
||||
type UpdateActiveTemplateVersion struct {
|
||||
ID uuid.UUID `json:"id" validate:"required" format:"uuid"`
|
||||
}
|
||||
type (
|
||||
TemplateBuildTimeStats map[WorkspaceTransition]TransitionStats
|
||||
UpdateActiveTemplateVersion struct {
|
||||
ID uuid.UUID `json:"id" validate:"required" format:"uuid"`
|
||||
}
|
||||
)
|
||||
|
||||
type TemplateRole string
|
||||
|
||||
@ -236,8 +238,7 @@ func (c *Client) TemplateDAUs(ctx context.Context, templateID uuid.UUID) (*Templ
|
||||
// AgentStatsReportRequest is a WebSocket request by coderd
|
||||
// to the agent for stats.
|
||||
// @typescript-ignore AgentStatsReportRequest
|
||||
type AgentStatsReportRequest struct {
|
||||
}
|
||||
type AgentStatsReportRequest struct{}
|
||||
|
||||
// AgentStatsReportResponse is returned for each report
|
||||
// request by the agent.
|
||||
|
Reference in New Issue
Block a user