add errs and subdomains func
This commit is contained in:
parent
d3bf027eef
commit
cde6075f00
|
@ -0,0 +1,10 @@
|
|||
package utils
|
||||
|
||||
func AggregateSubdomains(subdomains []string, domain string) []string {
|
||||
agdSub := make([]string, len(subdomains))
|
||||
for _, sd := range subdomains {
|
||||
agdSub = append(agdSub, sd+"."+domain)
|
||||
}
|
||||
|
||||
return agdSub
|
||||
}
|
|
@ -7,4 +7,6 @@ var (
|
|||
ErrReadConfigFile = errors.New("failed to read config file")
|
||||
// ErrNilLogger is thrown when the parameter logger is nil
|
||||
ErrNilLogger = errors.New("logger can't be nil")
|
||||
// ErrWrongStatusCode is thrown when the response status code isn't a 200
|
||||
ErrWrongStatusCode = errors.New("response sent an non 200 status code")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue