17 lines
423 B
Go
17 lines
423 B
Go
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)
|
|
}
|