Skip to content

Commit c0b2cf4

Browse files
committed
chore: fix typos and correct variable names
Several typos in comments and variable names were corrected for accuracy and clarity. This change helps maintain code readability and correctness.
1 parent 694079c commit c0b2cf4

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ jobs:
667667
# Prevent excessive build runs on minor version changes
668668
skip: "@(renovate/**|dependabot/**)"
669669
# Run TurboSnap to trace file dependencies to related stories
670-
# and tell chromatic to only take snapshots of relevent stories
670+
# and tell chromatic to only take snapshots of relevant stories
671671
onlyChanged: true
672672
# Avoid uploading single files, because that's very slow
673673
zip: true
@@ -694,7 +694,7 @@ jobs:
694694
workingDir: "./site"
695695
storybookBaseDir: "./site"
696696
# Run TurboSnap to trace file dependencies to related stories
697-
# and tell chromatic to only take snapshots of relevent stories
697+
# and tell chromatic to only take snapshots of relevant stories
698698
onlyChanged: true
699699
# Avoid uploading single files, because that's very slow
700700
zip: true

coderd/database/dbmem/dbmem.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ func minTime(t, u time.Time) time.Time {
941941
return u
942942
}
943943

944-
func provisonerJobStatus(j database.ProvisionerJob) database.ProvisionerJobStatus {
944+
func provisionerJobStatus(j database.ProvisionerJob) database.ProvisionerJobStatus {
945945
if isNotNull(j.CompletedAt) {
946946
if j.Error.String != "" {
947947
return database.ProvisionerJobStatusFailed
@@ -1202,7 +1202,7 @@ func (q *FakeQuerier) AcquireProvisionerJob(_ context.Context, arg database.Acqu
12021202
provisionerJob.StartedAt = arg.StartedAt
12031203
provisionerJob.UpdatedAt = arg.StartedAt.Time
12041204
provisionerJob.WorkerID = arg.WorkerID
1205-
provisionerJob.JobStatus = provisonerJobStatus(provisionerJob)
1205+
provisionerJob.JobStatus = provisionerJobStatus(provisionerJob)
12061206
q.provisionerJobs[index] = provisionerJob
12071207
// clone the Tags before returning, since maps are reference types and
12081208
// we don't want the caller to be able to mutate the map we have inside
@@ -7456,7 +7456,7 @@ func (q *FakeQuerier) InsertProvisionerJob(_ context.Context, arg database.Inser
74567456
Tags: maps.Clone(arg.Tags),
74577457
TraceMetadata: arg.TraceMetadata,
74587458
}
7459-
job.JobStatus = provisonerJobStatus(job)
7459+
job.JobStatus = provisionerJobStatus(job)
74607460
q.provisionerJobs = append(q.provisionerJobs, job)
74617461
return job, nil
74627462
}
@@ -8842,7 +8842,7 @@ func (q *FakeQuerier) UpdateProvisionerJobByID(_ context.Context, arg database.U
88428842
continue
88438843
}
88448844
job.UpdatedAt = arg.UpdatedAt
8845-
job.JobStatus = provisonerJobStatus(job)
8845+
job.JobStatus = provisionerJobStatus(job)
88468846
q.provisionerJobs[index] = job
88478847
return nil
88488848
}
@@ -8863,7 +8863,7 @@ func (q *FakeQuerier) UpdateProvisionerJobWithCancelByID(_ context.Context, arg
88638863
}
88648864
job.CanceledAt = arg.CanceledAt
88658865
job.CompletedAt = arg.CompletedAt
8866-
job.JobStatus = provisonerJobStatus(job)
8866+
job.JobStatus = provisionerJobStatus(job)
88678867
q.provisionerJobs[index] = job
88688868
return nil
88698869
}
@@ -8886,7 +8886,7 @@ func (q *FakeQuerier) UpdateProvisionerJobWithCompleteByID(_ context.Context, ar
88868886
job.CompletedAt = arg.CompletedAt
88878887
job.Error = arg.Error
88888888
job.ErrorCode = arg.ErrorCode
8889-
job.JobStatus = provisonerJobStatus(job)
8889+
job.JobStatus = provisionerJobStatus(job)
88908890
q.provisionerJobs[index] = job
88918891
return nil
88928892
}

coderd/httpmw/clitelemetry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func ReportCLITelemetry(log slog.Logger, rep telemetry.Reporter) func(http.Handl
4646
return
4747
}
4848

49-
byt, err := base64.StdEncoding.DecodeString(payload)
49+
byte, err := base64.StdEncoding.DecodeString(payload)
5050
if err != nil {
5151
log.Error(
5252
r.Context(),
@@ -57,7 +57,7 @@ func ReportCLITelemetry(log slog.Logger, rep telemetry.Reporter) func(http.Handl
5757
}
5858

5959
var inv clitelemetry.Invocation
60-
err = json.Unmarshal(byt, &inv)
60+
err = json.Unmarshal(byte, &inv)
6161
if err != nil {
6262
log.Error(
6363
r.Context(),

coderd/httpmw/workspaceproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func ExtractWorkspaceProxy(opts ExtractWorkspaceProxyConfig) func(http.Handler)
148148

149149
type workspaceProxyParamContextKey struct{}
150150

151-
// WorkspaceProxyParam returns the worksace proxy from the ExtractWorkspaceProxyParam handler.
151+
// WorkspaceProxyParam returns the workspace proxy from the ExtractWorkspaceProxyParam handler.
152152
func WorkspaceProxyParam(r *http.Request) database.WorkspaceProxy {
153153
user, ok := r.Context().Value(workspaceProxyParamContextKey{}).(database.WorkspaceProxy)
154154
if !ok {

coderd/workspaceagents.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,13 +1023,13 @@ func (api *API) watchWorkspaceAgentMetadata(rw http.ResponseWriter, r *http.Requ
10231023
// Send metadata on updates, we must ensure subscription before sending
10241024
// initial metadata to guarantee that events in-between are not missed.
10251025
update := make(chan agentapi.WorkspaceAgentMetadataChannelPayload, 1)
1026-
cancelSub, err := api.Pubsub.Subscribe(agentapi.WatchWorkspaceAgentMetadataChannel(workspaceAgent.ID), func(_ context.Context, byt []byte) {
1026+
cancelSub, err := api.Pubsub.Subscribe(agentapi.WatchWorkspaceAgentMetadataChannel(workspaceAgent.ID), func(_ context.Context, byte []byte) {
10271027
if ctx.Err() != nil {
10281028
return
10291029
}
10301030

10311031
var payload agentapi.WorkspaceAgentMetadataChannelPayload
1032-
err := json.Unmarshal(byt, &payload)
1032+
err := json.Unmarshal(byte, &payload)
10331033
if err != nil {
10341034
log.Error(ctx, "failed to unmarshal pubsub message", slog.Error(err))
10351035
return

codersdk/deployment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2887,11 +2887,11 @@ func (c *DeploymentValues) WithoutSecrets() (*DeploymentValues, error) {
28872887
var ff DeploymentValues
28882888

28892889
// Create copy via JSON.
2890-
byt, err := json.Marshal(c)
2890+
byte, err := json.Marshal(c)
28912891
if err != nil {
28922892
return nil, err
28932893
}
2894-
err = json.Unmarshal(byt, &ff)
2894+
err = json.Unmarshal(byte, &ff)
28952895
if err != nil {
28962896
return nil, err
28972897
}

0 commit comments

Comments
 (0)