mirror of
				https://github.com/MontFerret/ferret.git
				synced 2025-10-30 23:37:40 +02:00 
			
		
		
		
	Param (#282)
* sync with MontFerret/ferret * 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:
		| @@ -89,7 +89,6 @@ You can download latest binaries from [here](https://github.com/MontFerret/ferre | ||||
| * Chrome or Docker | ||||
|  | ||||
| #### Development | ||||
| * GoDep | ||||
| * GNU Make | ||||
| * ANTLR4 >=4.7.1 | ||||
|  | ||||
| @@ -540,5 +539,5 @@ LET c = COOKIES_GET(doc, "baz") | ||||
|  | ||||
| FOR cookie IN doc.cookies | ||||
|     RETURN cookie.name | ||||
|  | ||||
| ``` | ||||
| 	 | ||||
| ``` | ||||
|   | ||||
							
								
								
									
										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