Change test structure into tabledriven

Review change
Update README.md
This commit is contained in:
cemturker
2020-11-18 18:51:22 +01:00
parent 4ad5c7b99c
commit 7f21fdee68
5 changed files with 102 additions and 47 deletions

View File

@ -20,7 +20,7 @@ const (
)
type DNS struct {
// QueryType is the type for the DNS records like A,AAAA, CNAME...
// QueryType is the type for the DNS records like A, AAAA, CNAME...
QueryType string `yaml:"query-type"`
// QueryName is the query for DNS
QueryName string `yaml:"query-name"`
@ -77,7 +77,7 @@ func (d *DNS) query(url string, result *Result) {
result.Body = []byte(ns.Ns)
}
default:
result.Body = []byte("not supported")
result.Body = []byte("query type is not supported yet")
}
}
}