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

Templates: trimSpace function #17

Merged
merged 3 commits into from
Jun 16, 2024
Merged

Templates: trimSpace function #17

merged 3 commits into from
Jun 16, 2024

Conversation

michurin
Copy link
Owner

Works like that:

default behaviour:

go run ./cmd/pplog/... echo -e 'asdf\r'
INVALID JSON: "asdf\r"

Customized template:

PPLOG_ERRLINE='INVALID: {{ .TEXT | trimSpace | printf "%q" }}' go run ./cmd/pplog/... echo -e 'asdf\r'
INVALID: "asdf"

#16

@michurin michurin mentioned this pull request Jun 15, 2024
@michurin michurin merged commit dd4a67e into master Jun 16, 2024
16 checks passed
@michurin michurin deleted the trim branch June 16, 2024 03:05
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.

1 participant