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
2545a8e7
authored
5 years ago
by
lancet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all methods are working
parent
b9df27c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
kvcache
+0
-0
web/control.go
+10
-2
No files found.
kvcache
View file @
2545a8e7
No preview for this file type
This diff is collapsed.
Click to expand it.
web/control.go
View file @
2545a8e7
...
...
@@ -46,8 +46,16 @@ func (svc *Svc) SetValue(w http.ResponseWriter, r *http.Request) {
func
(
svc
*
Svc
)
DelValue
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
vars
:=
mux
.
Vars
(
r
)
id
:=
vars
[
"id"
]
resp
:=
fmt
.
Sprintf
(
"Delete ID: %s
\n
"
,
id
)
fmt
.
Fprint
(
w
,
resp
)
reply
:=
make
(
chan
vault
.
Message
)
msg
:=
vault
.
Message
{
Action
:
"DEL"
,
Reply
:
reply
,
Key
:
id
}
svc
.
exchange
<-
msg
resp
:=
<-
reply
if
resp
.
Error
!=
true
{
fmt
.
Fprint
(
w
,
"OK"
)
return
}
w
.
WriteHeader
(
http
.
StatusBadRequest
)
fmt
.
Fprint
(
w
,
"FAILURE"
)
}
// InitRouter - инициализировать маршрутизацию запросов
...
...
This diff is collapsed.
Click to expand it.
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