Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
qiuqunfeng
waf-console
Commits
08f46675
Commit
08f46675
authored
Feb 17, 2025
by
qiuqunfeng
Browse files
commit
parent
7cf20278
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
internal/model/waf.go
internal/model/waf.go
+2
-4
No files found.
internal/model/waf.go
View file @
08f46675
...
@@ -3,7 +3,6 @@ package model
...
@@ -3,7 +3,6 @@ package model
import
(
import
(
"database/sql/driver"
"database/sql/driver"
"encoding/json"
"encoding/json"
"strings"
"github.com/rs/zerolog/log"
"github.com/rs/zerolog/log"
)
)
...
@@ -11,13 +10,12 @@ import (
...
@@ -11,13 +10,12 @@ import (
type
HostList
[]
string
type
HostList
[]
string
func
(
h
HostList
)
Value
()
(
driver
.
Value
,
error
)
{
func
(
h
HostList
)
Value
()
(
driver
.
Value
,
error
)
{
return
strings
.
Join
(
h
,
","
),
nil
return
json
.
Marshal
(
h
)
}
}
func
(
h
*
HostList
)
Scan
(
src
interface
{})
error
{
func
(
h
*
HostList
)
Scan
(
src
interface
{})
error
{
log
.
Info
()
.
Msgf
(
"Scan host list: %v"
,
src
)
log
.
Info
()
.
Msgf
(
"Scan host list: %v"
,
src
)
*
h
=
strings
.
Split
(
src
.
(
string
),
","
)
return
json
.
Unmarshal
(
src
.
([]
byte
),
h
)
return
nil
}
}
type
RuleCategoryStatus
struct
{
type
RuleCategoryStatus
struct
{
...
...
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