Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New static-template group #378

Merged
merged 2 commits into from
Jun 22, 2024
Merged

New static-template group #378

merged 2 commits into from
Jun 22, 2024

Conversation

folbricht
Copy link
Owner

Related to #366

Introduces a new group static-template which works exactly like static-responder but instead of plain strings uses templates that are processed at query-time allowing responses to be based on data in the query such as the question, type, id, or class. For example:

[groups.static]
type   = "static-template"
answer = [
    '{{ .Question }} IN {{ .QuestionType }} {{ trimSuffix .Question ".rebind."}}'
]

@folbricht folbricht merged commit ea836d4 into master Jun 22, 2024
3 checks passed
@folbricht folbricht deleted the static-template-responder branch August 10, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants