mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
minor changes
This commit is contained in:
@@ -26,7 +26,7 @@ func (h *HTTPHeaderFilters) Set(value string) error {
|
||||
}
|
||||
r, err := regexp.Compile(valArr[1])
|
||||
if err != nil {
|
||||
return errors.New("could not compile regexp.")
|
||||
return err
|
||||
}
|
||||
|
||||
*h = append(*h, headerFilter{name: valArr[0], regexp: r})
|
||||
|
||||
@@ -23,7 +23,7 @@ func (h *HTTPHeaderHashFilters) String() string {
|
||||
func (h *HTTPHeaderHashFilters) Set(value string) error {
|
||||
valArr := strings.SplitN(value, ":", 2)
|
||||
if len(valArr) < 2 {
|
||||
return errors.New("need both header and value, colon-delimited (ex. user_id:^169$).")
|
||||
return errors.New("need both header and value, colon-delimited (ex. user_id:1/2).")
|
||||
}
|
||||
|
||||
fracArr := strings.Split(valArr[1], "/")
|
||||
|
||||
Reference in New Issue
Block a user