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

Update help for serve command arguments #807

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Update help for serve command arguments #807

merged 1 commit into from
Feb 25, 2022

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Feb 25, 2022

This PR updates the help section for the serve command.

Variables in arguments must be lower-case and without a ., e.g.

terraform-ls serve -cpuprofile='/Users/dbanck/tmp/profile-{{timestamp}}.pprof'`

@dbanck dbanck added the bug Something isn't working label Feb 25, 2022
@dbanck dbanck self-assigned this Feb 25, 2022
@dbanck dbanck requested a review from a team February 25, 2022 13:30
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, confirmed from

tpl = tpl.Funcs(template.FuncMap{
"timestamp": time.Now().Local().Unix,
"pid": os.Getpid,
"ppid": os.Getppid,
})

We could go further in clarifying that these are in fact templating functions, rather than variables (variables do use the .CamelCase syntax, functions are without the dot and typically lowercase).

That said don't treat it as blocker - this is already improving things significantly! 😄

@dbanck
Copy link
Member Author

dbanck commented Feb 25, 2022

We could go further in clarifying that these are in fact templating functions

At first, I had it like that, but I found it somewhat confusing after rereading it since it assumes that the user has some knowledge of Go template syntax.

From a user's perspective, this looks like a string with optional placeholders; that's why I would suggest calling them variables or placeholders.

@radeksimko
Copy link
Member

Totally fair - merge at will! 👍🏻

@dbanck dbanck merged commit 8112cbc into main Feb 25, 2022
@dbanck dbanck deleted the b-update-serve-docs branch February 25, 2022 15:02
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants