Re: [go-nuts] pprof cpu profile doesn't write sample to file

2019-11-14 Thread robert engels
I think an easier way is to enable the http based profiling, then just request the profile using the web interface using N seconds - much easier. You can make enabling the http profiling a compile time option. > On Nov 14, 2019, at 10:41 PM, Michael Jones wrote: > > If your program is endless,

[go-nuts] golang tool for splitting long lines

2019-11-14 Thread Sankar
Hi In Javascript world I have this handy tool Prettier which will automatically, reproducibly break long lines of code into multiple lines (and also merge parameters into a single line if some elements are removed). Are there similar tools available for Golang ? Either as a standalone progra

Re: [go-nuts] pprof cpu profile doesn't write sample to file

2019-11-14 Thread Michael Jones
If your program is endless, then you'll need to have a timer that says "it's been long enough, write the profile now" On Thu, Nov 14, 2019 at 9:35 AM bln prasad wrote: > My applications main starts few go routines and runs indefinitely. its > like pprof.StopCPUProfile() may never get called. > >

[go-nuts] ANN: goht v1.0, a minimalist package for creating web content in Go

2019-11-14 Thread Michael Ellis
https://github.com/Michael-F-Ellis/goht Easy to learn and practical for simple web development. I developed it for use in my own work and it seems worth sharing. Cheers, Mike -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] pprof cpu profile doesn't write sample to file

2019-11-14 Thread bln prasad
My applications main starts few go routines and runs indefinitely. its like pprof.StopCPUProfile() may never get called. Thanks, BLN On Wednesday, 13 November 2019 23:30:47 UTC+5:30, Ian Lance Taylor wrote: > > On Wed, Nov 13, 2019 at 9:37 AM bln prasad > wrote: > > > > I'm running go applic

Re: [go-nuts] Should I return an error object, or a pointer to an error object?

2019-11-14 Thread Jake Montgomery
On Wednesday, November 13, 2019 at 3:22:56 PM UTC-5, Brian Candler wrote: > > > the current implementation of interfaces is that they always store > pointer > > values. If you store a non-pointer value in an interface, that value > > is copied into memory, and a pointer to that memory is stored

Re: [go-nuts] Re: Go WebAssembly(wasm) testing fails - fatal error: unexpected signal during runtime execution

2019-11-14 Thread Agniva De Sarker
Please also try with 1.13.x and see if you see the issue there too. Also please try running manually in FF too. On Thu, Nov 14, 2019 at 10:08 PM mihai barbulescu wrote: > - Are you able to provide the code which causes this crash ? > Not really...it's a big code-base... I will try to reproduce

[go-nuts] Re: Go WebAssembly(wasm) testing fails - fatal error: unexpected signal during runtime execution

2019-11-14 Thread mihai barbulescu
- Are you able to provide the code which causes this crash ? Not really...it's a big code-base... I will try to reproduce a smaller testcase and update the post. - Which Go version are you using ? go tip - Are you testing this in the browser or in Node ? Please give details of either. In the bro

[go-nuts] Re: Go WebAssembly(wasm) testing fails - fatal error: unexpected signal during runtime execution

2019-11-14 Thread Agniva De Sarker
Please provide more information so that it helps people to debug the issue. Such as: - Are you able to provide the code which causes this crash ? - Which Go version are you using ? - Are you testing this in the browser or in Node ? Please give details of either. On Thursday, 14 November 2019

[go-nuts] Re: go.dev is live!

2019-11-14 Thread sbs . 191197
Hi, I am a Software Engineer working at a Fashion E-Commerce company in India. Golang has been a part of our journey for the last 2-3 years and has allowed us to scale massively in the past 2-3 years. Would it be okay if we send out an article regarding our journey with Golang over the past 2-

Re: [go-nuts] Re: [golang-dev] go.dev is live!

2019-11-14 Thread Mohamed Yousif
Is there any plans on open sourcing go.dev (the webservices behind it). It is a little bit odd, but I'll personally learn a lot from it. Oh, and congrats on the great work. I really liked it so much and would definitely use it a lot over godoc. Regards, M On Thu, Nov 14, 2019 at 12:00 PM Dan Kor

Re: [go-nuts] Re: [golang-dev] go.dev is live!

2019-11-14 Thread Dan Kortschak
Yes. This is my exact concern. This has two impacts, one is the non-discoverability and the other is a possibility of misapprehension that the packages are in fact non- licensed which is an actual harm to the packages. The irony is that we have gone to excessive lengths to ensure that all our orig

Re: [go-nuts] using or extending or forking+renaming github.com/google/licensecheck to provide similar functionality

2019-11-14 Thread fgergo
Sorry I did not read your response fully. Repeating the matching is just fine. Thanks again! On Thu, Nov 14, 2019 at 10:56 AM wrote: > > Thanks, I did not realize that Coverage -> Match[n] could be that useful! > Though the field Match.Name is not a file name I can os.Open(). > How can I directly

Re: [go-nuts] using or extending or forking+renaming github.com/google/licensecheck to provide similar functionality

2019-11-14 Thread fgergo
Thanks, I did not realize that Coverage -> Match[n] could be that useful! Though the field Match.Name is not a file name I can os.Open(). How can I directly access the known license texts? On Thu, Nov 14, 2019 at 10:42 AM Dan Kortschak wrote: > > The licensecheck.Match type holds the start and e

Re: [go-nuts] Re: [golang-dev] go.dev is live!

2019-11-14 Thread Jan Mercl
On Thu, Nov 14, 2019 at 5:55 AM Dan Kortschak wrote: > It looks like license detection needs work. > > See https://pkg.go.dev/gonum.org/v1/gonum?tab=overview and note it has > a BSD 3 clause, as shown by GitHub's assessment (just above the "Clone > or download" button) at https://github.com/gonum

Re: [go-nuts] using or extending or forking+renaming github.com/google/licensecheck to provide similar functionality

2019-11-14 Thread Dan Kortschak
The licensecheck.Match type holds the start and end offsets in the file. Can't you use that to extract the license portion and either check it's length against the length of the license or repeat the Check with only that portion of the file? On Thu, 2019-11-14 at 10:24 +0100, fge...@gmail.com wrot

Re: [go-nuts] using or extending or forking+renaming github.com/google/licensecheck to provide similar functionality

2019-11-14 Thread fgergo
Sorry if I was not clear: on walking the file system, that's clear, I did not intend to talk about that, only about matching and reporting on matching. The example I gave was just to put in context why I believe I'd need a different api. Using the Options field is good enough in the first example.

Re: [go-nuts] Re: [golang-dev] go.dev is live!

2019-11-14 Thread Ian Davis
On Thu, 14 Nov 2019, at 4:54 AM, Dan Kortschak wrote: > Hi, > > It looks like license detection needs work. > > See https://pkg.go.dev/gonum.org/v1/gonum?tab=overview and note it has > a BSD 3 clause, as shown by GitHub's assessment (just above the "Clone > or download" button) at https://github.

Re: [go-nuts] using or extending or forking+renaming github.com/google/licensecheck to provide similar functionality

2019-11-14 Thread Rob Pike
As I understand what you're trying to do, you just need to write a tree walker, perhaps using filepath.Walk, that opens each file and calls Cover on it. You can set the Options field to control the threshold for reporting, and use the result of that to choose which licenses to report. I don't beli