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
7cf20278
Commit
7cf20278
authored
Feb 17, 2025
by
qiuqunfeng
Browse files
commit
parent
eb59e225
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
internal/model/waf.go
internal/model/waf.go
+3
-0
No files found.
internal/model/waf.go
View file @
7cf20278
...
@@ -4,6 +4,8 @@ import (
...
@@ -4,6 +4,8 @@ import (
"database/sql/driver"
"database/sql/driver"
"encoding/json"
"encoding/json"
"strings"
"strings"
"github.com/rs/zerolog/log"
)
)
type
HostList
[]
string
type
HostList
[]
string
...
@@ -13,6 +15,7 @@ func (h HostList) Value() (driver.Value, error) {
...
@@ -13,6 +15,7 @@ func (h HostList) Value() (driver.Value, error) {
}
}
func
(
h
*
HostList
)
Scan
(
src
interface
{})
error
{
func
(
h
*
HostList
)
Scan
(
src
interface
{})
error
{
log
.
Info
()
.
Msgf
(
"Scan host list: %v"
,
src
)
*
h
=
strings
.
Split
(
src
.
(
string
),
","
)
*
h
=
strings
.
Split
(
src
.
(
string
),
","
)
return
nil
return
nil
}
}
...
...
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