refactor - pasdns can now look sane 3.0
This commit is contained in:
parent
57fbfbf059
commit
61f89c8067
7 changed files with 3 additions and 3 deletions
17
helper/response.go
Normal file
17
helper/response.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package helper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"git.gay/exhq/pas/Constants"
|
||||
)
|
||||
|
||||
func IntentGenerator(res Constants.Response) string {
|
||||
headersString := ""
|
||||
for key, value := range res.ResponseHeader {
|
||||
headersString += fmt.Sprintf("%s:%s\n", key, value)
|
||||
}
|
||||
headersString = strings.TrimSuffix(headersString, "\n")
|
||||
return fmt.Sprintf("PAS %s\n%s\n\n%s", string(res.OperationSuccessClassification), headersString, res.Body)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue