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

2020-01-10 Thread andrew.wilkins via golang-nuts
On Thursday, January 9, 2020 at 11:39:41 PM UTC+8, Jared Stofflett 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

Re: [go-nuts] Is the GC recovering storage when full slice expression reduce capacity ?

2020-01-10 Thread keith . randall
On Friday, January 10, 2020 at 1:02:22 AM UTC-8, Jan Mercl wrote: > > On Fri, Jan 10, 2020 at 9:52 AM Christophe Meessen > > wrote: > > > > It is possible to reduce the capacity of a slice by using the full slice > expression (https://golang.org/ref/spec#Slice_expressions). > > > > Now

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

2020-01-10 Thread Jared Stofflett
I use Jaws as my screen reader and as far as I can tell there's no way to automatically announce underlining, italics, or bolding in HTML. I'd use the region role for all uncovered code. See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Region_role I'm not an

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

2020-01-10 Thread 'David Chase' via golang-nuts
Lack of accessibility is a legitimate bug. Would would be good for you? For example, is there something in html that would work? I have no idea what current screen readers do -- would *underlining*, or *bolding*, or *italics?* (I used the three styles for the three words in the line just above.)

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

2020-01-10 Thread David Finkel
On Thu, Jan 9, 2020 at 10:22 AM wrote: > 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: >

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

2020-01-10 Thread Tom Payne
Many thanks for this Paul - this is exactly what I was looking for. Cheers, Tom On Fri, 10 Jan 2020 at 09:55, Paul Jolly wrote: > Hi Tom, > > > 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

Re: [go-nuts] How do I initialize extemplate (a template engine in golang) so that I can use with Echo minimalist framework

2020-01-10 Thread Ehioje Henry Erabor
Thanks Chris Burkert and Uzondu. xt := {} was indeed nil and was not initialized. I created a function that when called enabled me to initialize the extemplate before returning an instance of the used struct and its field (The field value of the struct is what is actually initialized). func

Re: [go-nuts] Is the GC recovering storage when full slice expression reduce capacity ?

2020-01-10 Thread Jan Mercl
On Fri, Jan 10, 2020 at 9:52 AM Christophe Meessen wrote: > > It is possible to reduce the capacity of a slice by using the full slice > expression (https://golang.org/ref/spec#Slice_expressions). > > Now consider the following code where a is a 1MB slice. I then create b, a > slice of a, but

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

2020-01-10 Thread Paul Jolly
Hi Tom, > 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.

[go-nuts] Is the GC recovering storage when full slice expression reduce capacity ?

2020-01-10 Thread Christophe Meessen
It is possible to reduce the capacity of a slice by using the full slice expression (https://golang.org/ref/spec#Slice_expressions). Now consider the following code where a is a 1MB slice. I then create b, a slice of a, but with a much smaller capacity. Finally, I change the value of a so that