优化cfg初始化
This commit is contained in:
parent
80ce64f8e1
commit
f787899725
@ -32,6 +32,15 @@ func fillCfg(cfg *AccessConfig) {
|
||||
if nil == cfg.ExtraFieldList {
|
||||
cfg.ExtraFieldList = make([]string, 0)
|
||||
}
|
||||
if nil == cfg.RequestHeaderList {
|
||||
cfg.RequestHeaderList = make([]string, 0)
|
||||
}
|
||||
if nil == cfg.ResponseHeaderList {
|
||||
cfg.ResponseHeaderList = make([]string, 0)
|
||||
}
|
||||
if nil == cfg.ExtraFieldList {
|
||||
cfg.ExtraFieldList = make([]string, 0)
|
||||
}
|
||||
cfg.ExtraFieldList = append(cfg.ExtraFieldList, define.RecordRequestDataField, define.RecordResponseDataField)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user