Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-28 Thread Michael Jones
Great! On Fri, Apr 28, 2017 at 6:14 PM, Vikas Kumar wrote: > Thanks again Michael and Ishan. My git-hook is completed now, running > perfectly :) > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop re

Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-28 Thread Vikas Kumar
Thanks again Michael and Ishan. My git-hook is completed now, running perfectly :) -- 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...@google

Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-25 Thread Michael Jones
Sure. Here's a slightly expanded example. https://play.golang.org/p/bfKFrATI0q On Tue, Apr 25, 2017 at 5:20 AM, Vikas Kumar wrote: > Thanks a ton Michael and Ishan. Let me understand the code and use this in > my program. > > Cheers, > Vikas > > -- > You received this message because you are sub

Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-25 Thread Vikas Kumar
Thanks a ton Michael and Ishan. Let me understand the code and use this in my program. Cheers, Vikas -- 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

Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-23 Thread Michael Jones
...or if you copy the strings.Contains() comparison to the test, it echoes the program with six and each of the patterns removed. On Sun, Apr 23, 2017 at 7:57 AM, Michael Jones wrote: > Another example: > https://play.golang.org/p/hDKQtwHo6M > > In this case, just copy the program to your machin

Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-23 Thread Michael Jones
Another example: https://play.golang.org/p/hDKQtwHo6M In this case, just copy the program to your machine and build it. i called it lines.go when i run it as: lines < lines.go it echos the program with the line "six" removed On Sun, Apr 23, 2017 at 12:47 AM, Ishan Jain wrote: > You can do it