mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-17 01:32:22 +02:00
fix --param handling
When params is converted to map it uses strings.Split, which slices a string into all substrings separated by :.
This commit is contained in:
2
main.go
2
main.go
@ -29,7 +29,7 @@ func (p *Params) ToMap() (map[string]interface{}, error) {
|
||||
res := make(map[string]interface{})
|
||||
|
||||
for _, entry := range *p {
|
||||
pair := strings.Split(entry, ":")
|
||||
pair := strings.SplitN(entry, ":", 2)
|
||||
|
||||
if len(pair) < 2 {
|
||||
return nil, core.Error(core.ErrInvalidArgument, entry)
|
||||
|
Reference in New Issue
Block a user