summaryrefslogtreecommitdiff
path: root/edge/test
diff options
context:
space:
mode:
authorKubeEdge Bot <48982446+kubeedge-bot@users.noreply.github.com>2020-05-28 21:34:52 +0800
committerGitHub <noreply@github.com>2020-05-28 21:34:52 +0800
commitde214535a4673a9e82cfd11e0a2b139050cc5276 (patch)
tree3c053e1858a0b4b9c0ef4476c398e2c820c09742 /edge/test
parentMerge pull request #1730 from daixiang0/unused (diff)
parentfeedback (diff)
downloadkubeedge-de214535a4673a9e82cfd11e0a2b139050cc5276.tar.gz
Merge pull request #1720 from daixiang0/enable-goconst
Lint: enable goconst linter
Diffstat (limited to 'edge/test')
-rw-r--r--edge/test/test.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/edge/test/test.go b/edge/test/test.go
index 9ade18702..b506d5ab7 100644
--- a/edge/test/test.go
+++ b/edge/test/test.go
@@ -108,11 +108,11 @@ func (tm *testManager) podHandler(w http.ResponseWriter, req *http.Request) {
}
switch req.Method {
- case "POST":
+ case http.MethodPost:
operation = model.InsertOperation
- case "DELETE":
+ case http.MethodDelete:
operation = model.DeleteOperation
- case "PUT":
+ case http.MethodPut:
operation = model.UpdateOperation
}
@@ -144,11 +144,11 @@ func (tm *testManager) deviceHandler(w http.ResponseWriter, req *http.Request) {
w.Write([]byte("unmarshal request body error"))
}
switch req.Method {
- case "POST":
+ case http.MethodPost:
operation = model.InsertOperation
- case "DELETE":
+ case http.MethodDelete:
operation = model.DeleteOperation
- case "PUT":
+ case http.MethodPut:
operation = model.UpdateOperation
}
msgReq := message.BuildMsg("edgehub", "", "edgemgr", "membership", operation, Content)
@@ -173,11 +173,11 @@ func (tm *testManager) secretHandler(w http.ResponseWriter, req *http.Request) {
}
switch req.Method {
- case "POST":
+ case http.MethodPost:
operation = model.InsertOperation
- case "DELETE":
+ case http.MethodDelete:
operation = model.DeleteOperation
- case "PUT":
+ case http.MethodPut:
operation = model.UpdateOperation
}
@@ -203,11 +203,11 @@ func (tm *testManager) configmapHandler(w http.ResponseWriter, req *http.Request
}
switch req.Method {
- case "POST":
+ case http.MethodPost:
operation = model.InsertOperation
- case "DELETE":
+ case http.MethodDelete:
operation = model.DeleteOperation
- case "PUT":
+ case http.MethodPut:
operation = model.UpdateOperation
}