@@ -2,12 +2,13 @@ package htmltest
2
2
3
3
import (
4
4
"fmt"
5
- "github.com/imdario/mergo"
6
- "github.com/wjdp/htmltest/issues"
7
5
"path"
8
6
"reflect"
9
7
"regexp"
10
8
"strings"
9
+
10
+ "github.com/imdario/mergo"
11
+ "github.com/wjdp/htmltest/issues"
11
12
)
12
13
13
14
// Options struct for htmltest, user and default options are merged and mapped
@@ -113,7 +114,7 @@ func DefaultOptions() map[string]interface{} {
113
114
"IgnoreSSLVerify" : false ,
114
115
"IgnoreTagAttribute" : "data-proofer-ignore" ,
115
116
116
- "HTTPHeaders" : map [string ] string {
117
+ "HTTPHeaders" : map [interface {}] interface {} {
117
118
"Range" : "bytes=0-0" , // If server supports prevents body being sent
118
119
"Accept" : "*/*" , // We accept all content types
119
120
},
@@ -145,9 +146,9 @@ func DefaultOptions() map[string]interface{} {
145
146
func (hT * HTMLTest ) setOptions (optsUser map [string ]interface {}) {
146
147
// Merge user and default options, set Opts var
147
148
optsMap := DefaultOptions ()
148
- mergo .MergeWithOverwrite (& optsMap , optsUser )
149
+ mergo .Merge (& optsMap , optsUser , mergo . WithOverride )
149
150
hT .opts = Options {}
150
- mergo .MapWithOverwrite (& hT .opts , optsMap )
151
+ mergo .Map (& hT .opts , optsMap , mergo . WithOverride )
151
152
152
153
// If debug dump the options struct
153
154
if hT .opts .LogLevel == issues .LevelDebug {
0 commit comments