mirror of
https://github.com/coder/coder.git
synced 2026-10-31 11:02:50 +08:00
refactor: upgrade golangci-lint to v2.0.2 (#28416)
This commit is contained in:
@@ -122,7 +122,7 @@ func (api *API) workspace(rw http.ResponseWriter, r *http.Request) {
|
||||
workspace,
|
||||
data.builds[0],
|
||||
data.templates[0],
|
||||
api.Options.AllowWorkspaceRenames,
|
||||
api.AllowWorkspaceRenames,
|
||||
appStatus,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -339,7 +339,7 @@ func (api *API) workspaceByOwnerAndName(rw http.ResponseWriter, r *http.Request)
|
||||
workspace,
|
||||
data.builds[0],
|
||||
data.templates[0],
|
||||
api.Options.AllowWorkspaceRenames,
|
||||
api.AllowWorkspaceRenames,
|
||||
appStatus,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -851,7 +851,7 @@ func createWorkspace(
|
||||
workspace,
|
||||
apiBuild,
|
||||
template,
|
||||
api.Options.AllowWorkspaceRenames,
|
||||
api.AllowWorkspaceRenames,
|
||||
codersdk.WorkspaceAppStatus{},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -1154,7 +1154,7 @@ func (api *API) patchWorkspace(rw http.ResponseWriter, r *http.Request) {
|
||||
// patched in the future, it's enough if one changes.
|
||||
name := workspace.Name
|
||||
if req.Name != "" || req.Name != workspace.Name {
|
||||
if !api.Options.AllowWorkspaceRenames {
|
||||
if !api.AllowWorkspaceRenames {
|
||||
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
|
||||
Message: "Workspace renames are not allowed.",
|
||||
})
|
||||
@@ -1593,7 +1593,7 @@ func (api *API) putWorkspaceDormant(rw http.ResponseWriter, r *http.Request) {
|
||||
workspace,
|
||||
data.builds[0],
|
||||
data.templates[0],
|
||||
api.Options.AllowWorkspaceRenames,
|
||||
api.AllowWorkspaceRenames,
|
||||
appStatus,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -2172,7 +2172,7 @@ func (api *API) watchWorkspace(
|
||||
workspace,
|
||||
data.builds[0],
|
||||
data.templates[0],
|
||||
api.Options.AllowWorkspaceRenames,
|
||||
api.AllowWorkspaceRenames,
|
||||
appStatus,
|
||||
)
|
||||
if err != nil {
|
||||
@@ -2760,7 +2760,7 @@ func (api *API) workspaceData(ctx context.Context, workspaces []database.Workspa
|
||||
templates: templates,
|
||||
appStatuses: db2sdk.WorkspaceAppStatuses(appStatuses),
|
||||
builds: apiBuilds,
|
||||
allowRenames: api.Options.AllowWorkspaceRenames,
|
||||
allowRenames: api.AllowWorkspaceRenames,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user