[go-nuts] Re: About the change for default "-mod=vendor" in Go 1.14

2020-01-09 Thread Amnon Baron Cohen
On Thursday, 9 January 2020 08:38:56 UTC, T L wrote: > > Yes, when I change the "go 1.13" directive to "go 1.14", it suggests I > need to run 'go mod vendor' to sync. > After the sync, it works. Thanks for the help. > > So if the directive is 1.13, no default "-mod=vendor" compiler flag is >

[go-nuts] Re: About the change for default "-mod=vendor" in Go 1.14

2020-01-09 Thread T L
Yes, when I change the "go 1.13" directive to "go 1.14", it suggests I need to run 'go mod vendor' to sync. After the sync, it works. Thanks for the help. So if the directive is 1.13, no default "-mod=vendor" compiler flag is set? And not any message is suggested? On Wednesday, January 8, 2020

[go-nuts] Is it possible to get code coverage information in a way that does not assume you can see color?

2020-01-09 Thread jared . stofflet
I'm a totally blind developer who is trying to learn go. When running go tool cover -html=cover.out -o cover.html It appears the HTML generated uses color to show the lines of code that are not covered without any other way of identifying uncovered lines. This is obviously an issue if your

[go-nuts] Code Coverage for executable written in GoLang

2020-01-09 Thread rk303sharma
I have one exe file which contains code written in the Go language. I don’t have a source code for this. Is there a tool or technique by which I can determine the code Coverage for this executable. I will trigger my test cases by using this exe. -- You received this message because you are

[go-nuts] Re: How to print an AST without formatting?

2020-01-09 Thread Julio Guerra
I saw `go tool cover` does it, but I don't see anything else but a simple call to printer.Fprint(w, f.fset, f.astFile) at https://github.com/golang/tools/blob/master/cmd/cover/cover.go#L384 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Is it possible to get code coverage information in a way that does not assume you can see color?

2020-01-09 Thread Sam Whited
On Thu, Jan 9, 2020, at 08:50, jared.stoff...@gmail.com wrote: > I'm a totally blind developer who is trying to learn go. When running > > go tool cover -html=cover.out -o cover.html > > It appears the HTML generated uses color to show the lines of code > that are not covered without any other way

[go-nuts] user-generated TLS Master and Traffic Secret keys

2020-01-09 Thread rabaruch
Looking at the crypto/tls package, it looks like there's no way to use an externally generated symmetric key, rather the masterSecret is generated internally and is not exposed to the user. Why is this the case? If a user wants to use their own key-generation to supply the TLS session's

[go-nuts] Re: About the change for default "-mod=vendor" in Go 1.14

2020-01-09 Thread T L
On Thursday, January 9, 2020 at 3:38:56 AM UTC-5, T L wrote: > > Yes, when I change the "go 1.13" directive to "go 1.14", it suggests I > need to run 'go mod vendor' to sync. > After the sync, it works. Thanks for the help. > > So if the directive is 1.13, no default "-mod=vendor" compiler flag

[go-nuts] Some doubts about http.Server ConnContext

2020-01-09 Thread Manlio Perillo
I have some doubts about the usefulness of Server.ConnContext, given that it exposes the underlying network connection. IMHO, the only things that can be obtained by net.Conn are the local address (already in LocalAddrContextKey) and the remote address and the TLS info (already in Request).

[go-nuts] How to print an AST without formatting?

2020-01-09 Thread julio
Hello, I am looking for a way to keep to original token positioning but I cannot find how to avoid it when using `go/printer` or `go/format`. Basically, how to make this example print the same string that was parsed: https://play.golang.org/p/dI7WcevQJAZ Thanks for your help! Julio -- You

Re: [go-nuts] Panicking in public API ?

2020-01-09 Thread K.S. Bhaskar
Those are good guidelines. I'd like to add a couple of nuances. For “system” or “operations” errors (we have a database engine that executes in the address space of processes, so there can be errors such as an IO error or an inability to expand because of insufficient space in the file

Re: [go-nuts] Panicking in public API ?

2020-01-09 Thread Scott Pakin
On Tuesday, January 7, 2020 at 12:47:28 AM UTC-7, Axel Wagner wrote: > > Thus, panics are the right tool to use when reporting an issue that > requires programmer attention and errors are the right tool when reporting > an issue that requires user-attention (or, of course, can be handled >

[go-nuts] Go 1.13.6 and Go 1.12.15 are released

2020-01-09 Thread Carlos Amedee
Hello gophers, We have just released Go versions 1.13.6 and 1.12.15, minor point releases. These releases include fixes to the runtime and to the net/http package. The macOS releases enable the Hardened Runtime. Seehttps://golang.org/issue/34986 for details. View the release notes for more

[go-nuts] Existing hermetic end-to-end testing libraries for CLI applications?

2020-01-09 Thread Tom Payne
Hi, tl;dr Are there any existing end-to-end testing libraries for CLI applications? Specifically, what I'm looking for is a library that makes it easy to test that "running this command should produce this output" without fear that a buggy application could corrupt the filesystem. Background:

[go-nuts] Re: Code Coverage for executable written in GoLang

2020-01-09 Thread Volker Dobler
On Thursday, 9 January 2020 16:39:40 UTC+1, rk303...@gmail.com wrote: > > I have one exe file which contains code written in the Go language. I > don’t have a source code for this. Is there a tool or technique by which I > can determine the code Coverage for this executable [?] > No, for