Skip to content

Commit

Permalink
fix reqID: use req.Type instead of template.Type
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed Aug 28, 2023
1 parent 5a38b2f commit 4f079d9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions v2/pkg/templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,64 +187,64 @@ func (template *Template) validateAllRequestIDs() {
if len(template.RequestsCode) > 1 {
for i, req := range template.RequestsCode {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
if len(template.RequestsDNS) > 1 {
for i, req := range template.RequestsDNS {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
if len(template.RequestsFile) > 1 {
for i, req := range template.RequestsFile {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
if len(template.RequestsHTTP) > 1 {
for i, req := range template.RequestsHTTP {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
if len(template.RequestsHeadless) > 1 {
for i, req := range template.RequestsHeadless {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}

}
if len(template.RequestsNetwork) > 1 {
for i, req := range template.RequestsNetwork {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
if len(template.RequestsSSL) > 1 {
for i, req := range template.RequestsSSL {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
if len(template.RequestsWebsocket) > 1 {
for i, req := range template.RequestsWebsocket {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
if len(template.RequestsWHOIS) > 1 {
for i, req := range template.RequestsWHOIS {
if req.ID == "" {
req.ID = template.Type().String() + "_" + strconv.Itoa(i)
req.ID = req.Type().String() + "_" + strconv.Itoa(i)
}
}
}
Expand Down

0 comments on commit 4f079d9

Please sign in to comment.