Re: [go-nuts] Re: gofmt question
Good points and I'm obviously going to deal with it. :-) Its sorta like all those agreements we click off on when we install software we just purchased. As if we have any other option but to agree to whatever the demands. :-) I'm already getting past it, just frustrating in some respects. Thanks again, Glenn -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: gofmt question
Another nice aspect of this is that formatting consistency is ecosystem-wide instead of company-wide. On Sat, Jul 1, 2017 at 9:43 AM Shawn Milochik wrote: > On Sat, Jul 1, 2017 at 11:40 AM, Glenn Hancock wrote: > >> Thanks for the responses. I guess I'll just deal with it. While I can >> understand the need to format code the same way, I would rather have my >> company policies dictate this instead of the all knowing Google force upon >> me what they think is proper. Guess we should get used to the new world >> order. :-) >> >> Go still rocks though :-) >> >> >> > It's not Google. It's the Go team. Go is an open-source project. I'm sure > plenty developers within Google itself have the same frustrations, until > they get used to it. I certainly had some personal issues when I started > with it, but now I don't notice or care at all anymore. > > Although you lose some in freedom in formatting your code, you gain a lot > more thanks to having to expend precisely zero and time effort to > formatting your code (if your editor runs gofmt/goimports automatically). > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: gofmt question
On Sat, Jul 1, 2017 at 11:40 AM, Glenn Hancock wrote: > Thanks for the responses. I guess I'll just deal with it. While I can > understand the need to format code the same way, I would rather have my > company policies dictate this instead of the all knowing Google force upon > me what they think is proper. Guess we should get used to the new world > order. :-) > > Go still rocks though :-) > > > It's not Google. It's the Go team. Go is an open-source project. I'm sure plenty developers within Google itself have the same frustrations, until they get used to it. I certainly had some personal issues when I started with it, but now I don't notice or care at all anymore. Although you lose some in freedom in formatting your code, you gain a lot more thanks to having to expend precisely zero and time effort to formatting your code (if your editor runs gofmt/goimports automatically). -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: gofmt question
Thanks for the responses. I guess I'll just deal with it. While I can understand the need to format code the same way, I would rather have my company policies dictate this instead of the all knowing Google force upon me what they think is proper. Guess we should get used to the new world order. :-) Go still rocks though :-) Glenn -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: gofmt question
Hi, If you add comments to preserve space, then other people who code with you might not be appreciative :> Have a look at git's hooks here: https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks and use those to place your personal formatting code and run Go's formatter. If you use svn or mercury, IIRC they all have similar services. Or, you can just write a plain wrap around script, but if you're feeling brave there's always emacs to do your bidding. Siduri On Sat, Jul 1, 2017 at 6:17 AM, Michael Jones wrote: > Find a way to use comments for your ""big space" > > On Fri, Jun 30, 2017 at 8:12 PM wrote: > >> I have a few such bug bears, so, my trick is to 'fix' fmt's helpful >> services when I check a file out, and only run fmt automatically when the >> file is committed to the repository. >> >> This keeps my fugly habits out of the tidy fmt'ed space and at the same >> time, keeps fmt's attempts to tickle my OCD safely away from me :-) >> >> Think about this way: because fmt enforces uniformity, you now have the >> chance to have your code shaped *exactly* they way you like it, without >> having to write too much formatting code to cover everyone's peculiarities. >> >> >> Siduri >> >> >> >> On Saturday, July 1, 2017 at 2:27:10 AM UTC+1, Glenn Hancock wrote: >>> >>> I am learning the go language and really liking it. However, there are >>> a few things that drive me crazy and I wanted to list one in particular to >>> see if there is some way to change it. >>> >>> When I write a package that has 20 different functions in it I like to >>> add 4 or 5 blank lines between each function to make it easier to scroll >>> down through the code and easily see where one starts and ends. Currently >>> gofmt removes all my extra lines and replaces them with a single space >>> which makes it difficult to easily see what I'm looking at. >>> >>> Is there some way to get it to not remove my extra lines? >>> >>> Thanks, >>> >>> Glenn >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > Michael T. Jones > michael.jo...@gmail.com > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: gofmt question
Find a way to use comments for your ""big space" On Fri, Jun 30, 2017 at 8:12 PM wrote: > I have a few such bug bears, so, my trick is to 'fix' fmt's helpful > services when I check a file out, and only run fmt automatically when the > file is committed to the repository. > > This keeps my fugly habits out of the tidy fmt'ed space and at the same > time, keeps fmt's attempts to tickle my OCD safely away from me :-) > > Think about this way: because fmt enforces uniformity, you now have the > chance to have your code shaped *exactly* they way you like it, without > having to write too much formatting code to cover everyone's peculiarities. > > > Siduri > > > > On Saturday, July 1, 2017 at 2:27:10 AM UTC+1, Glenn Hancock wrote: >> >> I am learning the go language and really liking it. However, there are a >> few things that drive me crazy and I wanted to list one in particular to >> see if there is some way to change it. >> >> When I write a package that has 20 different functions in it I like to >> add 4 or 5 blank lines between each function to make it easier to scroll >> down through the code and easily see where one starts and ends. Currently >> gofmt removes all my extra lines and replaces them with a single space >> which makes it difficult to easily see what I'm looking at. >> >> Is there some way to get it to not remove my extra lines? >> >> Thanks, >> >> Glenn >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Michael T. Jones michael.jo...@gmail.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: gofmt question
I have a few such bug bears, so, my trick is to 'fix' fmt's helpful services when I check a file out, and only run fmt automatically when the file is committed to the repository. This keeps my fugly habits out of the tidy fmt'ed space and at the same time, keeps fmt's attempts to tickle my OCD safely away from me :-) Think about this way: because fmt enforces uniformity, you now have the chance to have your code shaped *exactly* they way you like it, without having to write too much formatting code to cover everyone's peculiarities. Siduri On Saturday, July 1, 2017 at 2:27:10 AM UTC+1, Glenn Hancock wrote: > > I am learning the go language and really liking it. However, there are a > few things that drive me crazy and I wanted to list one in particular to > see if there is some way to change it. > > When I write a package that has 20 different functions in it I like to add > 4 or 5 blank lines between each function to make it easier to scroll down > through the code and easily see where one starts and ends. Currently gofmt > removes all my extra lines and replaces them with a single space which > makes it difficult to easily see what I'm looking at. > > Is there some way to get it to not remove my extra lines? > > Thanks, > > Glenn > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.