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

Caddyfile support backtick strings #2591

Closed
caibirdme opened this issue Apr 28, 2019 · 14 comments · Fixed by #3242
Closed

Caddyfile support backtick strings #2591

caibirdme opened this issue Apr 28, 2019 · 14 comments · Fixed by #3242
Labels
feature ⚙️ New feature or request
Milestone

Comments

@caibirdme
Copy link

1. What would you like to have changed?

Caddyfile support multi line string

2. Why is this feature a useful, necessary, and/or important addition to this project?

without supporting of multi line string, it's difficult to develop some new plugins which need user to configure some complex string such as json.

3. What alternatives are there, or what are you doing in the meantime to work around the lack of this feature?

directive here_might_be_a_json

# now
directive here_json_file_path

4. Please link to any relevant issues, pull requests, or other discussions.

@caibirdme caibirdme added the feature ⚙️ New feature or request label Apr 28, 2019
@caibirdme
Copy link
Author

If you approve this feature, I am willing to contribute

@mholt
Copy link
Member

mholt commented Apr 28, 2019

I believe the Caddyfile already supports multiline strings when enclosed in quotes.

@caibirdme
Copy link
Author

@mholt I mean somthing like this:

`{
"name": "foo",
 "age": "bar",
}`

But now, we must do it like:

"
{\"name\":\"foo\",
\"age\":\"bar\"
}
"

@linquize
Copy link
Contributor

Don't want to escape string

@mholt
Copy link
Member

mholt commented Apr 29, 2019

Ah, I see. So you want an alternate strings delimiter. Definitely possible.

@caibirdme
Copy link
Author

Yes, it would be perfect if Caddyfile supports this

@mholt
Copy link
Member

mholt commented Apr 29, 2019

Feel free to submit a PR, I hope the implementation will not be too tricky!

Also consider if this could break anyone (I doubt it, but, worth considering.)

@caibirdme
Copy link
Author

I'll try my best

@mholt mholt added this to the 2.0 milestone Sep 25, 2019
@vaibhav2ghadge
Copy link

@mholt what happen about this feature..? if not implemented yet can you explain me what we wan to do.

@mholt
Copy link
Member

mholt commented Jan 21, 2020

I dunno, I never got a PR from @caibirdme -- I don't have the time to do it right now but you're welcome to submit a PR for review.

@vaibhav2ghadge
Copy link

@mholt can you explain what have to do. i mean which feature your expecting

@mholt
Copy link
Member

mholt commented Jan 21, 2020

As described above, I think multi-line strings delimited by ` is a good idea:

`{
"name": "foo",
 "age": "bar",
}`

@vaibhav2ghadge
Copy link

vaibhav2ghadge commented Jan 21, 2020

@mholt im not able to understand for which scenario this will be usefull i mean when this type of object will come from whom (how to generate this scenario)

@mholt mholt changed the title Caddyfile support multi line string Caddyfile support backtick strings Apr 8, 2020
@mholt mholt modified the milestones: 2.x, 2.1 Apr 8, 2020
@mholt
Copy link
Member

mholt commented Apr 8, 2020

Implemented in #3242, will go out by Caddy 2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants