Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Ванин Дмитрий Михайлович
ms-rat
Commits
5d2031e4
Commit
5d2031e4
authored
2 years ago
by
Ванин Дмитрий Михайлович
Browse files
Options
Download
Patches
Plain Diff
fixfixfix
parent
2eb0892d
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rat-server.go
+2
-2
rat-server.go
with
2 additions
and
2 deletions
+2
-2
rat-server.go
+
2
−
2
View file @
5d2031e4
...
...
@@ -51,7 +51,7 @@ func writeInfo(w http.ResponseWriter, r *http.Request) {
return
}
str
ing
:=
strings
[
0
]
str
:=
strings
[
0
]
db
,
err
:=
sql
.
Open
(
"mysql"
,
os
.
Getenv
(
"DB_USER"
)
+
":"
+
os
.
Getenv
(
"DB_PASSWORD"
)
+
"@tcp("
+
os
.
Getenv
(
"DB_HOST"
)
+
":"
+
os
.
Getenv
(
"DB_PORT"
)
+
")/"
+
os
.
Getenv
(
"DB_NAME"
))
defer
db
.
Close
()
...
...
@@ -60,7 +60,7 @@ func writeInfo(w http.ResponseWriter, r *http.Request) {
log
.
Fatal
(
err
)
}
sql
:=
"INSERT INTO Den(Information) VALUES ("
+
string
+
")"
sql
:=
"INSERT INTO Den(Information) VALUES ("
+
string
(
str
)
+
")"
_
,
err
=
db
.
Exec
(
sql
)
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets