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

2017-04-23 Thread Konstantin Khomoutov
On Sat, 22 Apr 2017 08:08:57 -0700 (PDT) Vikas Kumar wrote: > I am trying to iterate over an array, match the lines in a file and > then delete all occurrences of the lines in the file. > > See this example. > *Array* > var abcd = [5]string{ > "one two", > "three

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

2017-04-23 Thread Vikas Kumar
Thanks Tamás, I am looking something in a Golang way so that I can create a binary and distribute it in the team which has some Windows users as well. Thanks for the pointers. Let me try it out. On Sunday, 23 April 2017 17:06:42 UTC+10, Tamás Gulácsi wrote: > > The easiest would be that sed.

[go-nuts] 1.9 roadmap will include 12750-localization.md ?

2017-04-23 Thread mhhcbon
Hi, About the roadmap of 1.9 (this one https://github.com/golang/go/milestone/49 ?) I can t find information about this proposal. But i see some changes about it in checkins. Will it be included in 1.9 ? Is there a formal document to introduce the next roadmap ? I mean something that goes

Re: [go-nuts] Re: `go tool trace` blank page (404 + Uncaught ReferenceError: tr is not defined)

2017-04-23 Thread Pierre Neidhardt
https://golang.org/doc/install/source does not document the folder hierarchy, nor could I find it documented elsewhere. Shouldn't we document the purpose of folders such as 'misc/'? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

Re: [go-nuts] Which benchmark case is the reliable one?

2017-04-23 Thread Dave Cheney
-gcflags=-m will help confirm this l. -- 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

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

2017-04-23 Thread Tamás Gulácsi
The easiest would be that sed. Otherwise, do as sed: iterate through the lines with a bufio.Scanner, and write out libes into a bytes.Buffer iff it doesn't match. At the end, overwrite the file with buf.Bytes using ioutil.WriteFile. -- You received this message because you are subscribed to the