Commit 7cf20278 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

commit

parent eb59e225
...@@ -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
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment