This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't
init
andmain
be better prefixes?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps. But I assumed folks would have the same trouble that #225 addresses particularly with the
main
function snippet. So, I usedfmain
and to be consistent, I usedfinit
as well. I'm used to the #225 problem because SublimeText has it too and I've gotten used to escaping out of the autocomplete. So, if folks thinkmain
andinit
are better prefixes... that's fine with me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue with
main
and #225 is valid. But does that apply toinit
as well?My only concern was discoverability of these snippets.
(Randomly picking Go extension users who have recently logged issues :) + people from the #225 thread )
@zmb3 , @atombender, @bennyscetbun, @kulshekhar, @freeformz, @patbaker82, @lukehoban
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All things considered,
fmain
andinit
seem like the most apt optionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmain
andinit
work for me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi my thought on this one.
I like consistency and many dev does too.
main/init should be good except that the #225 is a real pain when using it
So fmain/finit works fine for me :)
But please. No fmain/init or main/finit :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @bennyscetbun.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency does make sense and drive usability as well. Lets see if there is any other feedback over the weekend. I'll merge the PR (
fmain
andfinit
) on Monday if we don't hear anything more.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that 'test function' uses
tf
and 'goroutine function' usesgf
, maybe the main function can usemf
while the 'init' function can useinit
(if
might not be the best choice 🙂)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sigh.. This takes me back to a programmer's hardest task. http://imgur.com/y3dhJFQ : Naming things.
Going with
fmain
andfinit