Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lancet
/
kvcache
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7587a650
authored
Aug 06, 2020
by
Mikhail Sharkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some request handling fixes
parent
66c1a037
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
web/control.go
+3
-4
No files found.
web/control.go
View file @
7587a650
...
@@ -17,9 +17,9 @@ func (svc *Svc) GetValue(w http.ResponseWriter, r *http.Request) {
...
@@ -17,9 +17,9 @@ func (svc *Svc) GetValue(w http.ResponseWriter, r *http.Request) {
if
err
!=
nil
{
if
err
!=
nil
{
w
.
WriteHeader
(
http
.
StatusBadRequest
)
w
.
WriteHeader
(
http
.
StatusBadRequest
)
fmt
.
Fprint
(
w
,
"FAILURE"
)
fmt
.
Fprint
(
w
,
"FAILURE"
)
return
}
}
fmt
.
Fprint
(
w
,
value
)
fmt
.
Fprint
(
w
,
value
)
return
}
}
// SetValue - установить/обновить значение ключа
// SetValue - установить/обновить значение ключа
...
@@ -31,10 +31,9 @@ func (svc *Svc) SetValue(w http.ResponseWriter, r *http.Request) {
...
@@ -31,10 +31,9 @@ func (svc *Svc) SetValue(w http.ResponseWriter, r *http.Request) {
if
err
!=
nil
{
if
err
!=
nil
{
w
.
WriteHeader
(
http
.
StatusBadRequest
)
w
.
WriteHeader
(
http
.
StatusBadRequest
)
fmt
.
Fprint
(
w
,
"FAILURE"
)
fmt
.
Fprint
(
w
,
"FAILURE"
)
return
}
}
fmt
.
Fprint
(
w
,
"OK"
)
fmt
.
Fprint
(
w
,
"OK"
)
return
}
}
// DelValue - удалить ключ из хранилища
// DelValue - удалить ключ из хранилища
...
@@ -45,9 +44,9 @@ func (svc *Svc) DelValue(w http.ResponseWriter, r *http.Request) {
...
@@ -45,9 +44,9 @@ func (svc *Svc) DelValue(w http.ResponseWriter, r *http.Request) {
if
err
!=
nil
{
if
err
!=
nil
{
w
.
WriteHeader
(
http
.
StatusBadRequest
)
w
.
WriteHeader
(
http
.
StatusBadRequest
)
fmt
.
Fprint
(
w
,
"FAILURE"
)
fmt
.
Fprint
(
w
,
"FAILURE"
)
return
}
}
fmt
.
Fprint
(
w
,
"OK"
)
fmt
.
Fprint
(
w
,
"OK"
)
return
}
}
// InitRouter - инициализировать маршрутизацию запросов
// InitRouter - инициализировать маршрутизацию запросов
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment