[go-nuts] Table Driven Test (TDT) and log only failed test case

2018-01-26 Thread Jérôme LAFORGE
Hello Gophers, With Table Driven Test, if one test case is failed, then the log of all test cases are displayed. Is it possible to display only log of failed test case? Many thx in adv. Jérôme -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Scope/Implentation of Mutex

2018-01-26 Thread Tamás Gulácsi
A lock is just a lock, a variable which is inherently synchronized, safe to tinker with from several goroutines concurrently. It protects a variable iff your code uses it so. Iff you Lock before each access to that variable, and Unlock after it, then it's such a use. -- You received this messag

[go-nuts] Scope/Implentation of Mutex

2018-01-26 Thread Saanvi S
We are working with mutexes for a while now but I do not really understand how they work. we have checked the Code in the Go library but this did not help. Furthermore I just found articles about the usage and what it does on the surface, Is there a resou

[go-nuts] Re: Async process state snapshotting in Golang

2018-01-26 Thread matthewjuran
Why not this? type StructMap map[string]*SomeStruct type SyncStructMap struct { *sync.Mutex // maybe change to *sync.RWMutex if there are mixed read/write synced operations StructMap } func (a SyncStructMap) Copy() StructMap { out := make(StructMap) a.Lock() for key, value :

[go-nuts] Async process state snapshotting in Golang

2018-01-26 Thread Tamás Gulácsi
Do those *SomeStruct change during map serialization, or only the map (new keys / delete keys)? If they do, you'll have to lock them too, not just the map access! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] Difficulties Using golang.org/x/net/html

2018-01-26 Thread dc0d
Thanks Andy! I'll try read the spec to learn more. On Friday, January 26, 2018 at 7:29:47 PM UTC+3:30, Andy Balholm wrote: > > The prescription is correct; the diagnosis is close but not exactly right. > > The html package actually doesn’t pay any attention to the XML-style > self-closing tag syn

[go-nuts] Async process state snapshotting in Golang

2018-01-26 Thread jul . semaan
Hi, I'm currently tackling a head scratching problem (at least for me). First, I'll start by explaining my main goal: I have an in memory 'map[string]*SomeStructPointer' that I want to JSON encode and write to a file. Now since I want to prevent concurrent access to the map, I need to lock-down

[go-nuts] Re: Is it possible to determine total number of bytes read/written for an HTTP request? (including headers)

2018-01-26 Thread 'simon place' via golang-nuts
i was imagining the os/kernel (network stack) is controlling the routing of data, so knows the process handling the port, how many bytes go through to it and the ip it came from, plus the same for the response. i had a play with 'iptraf-ng' ( the older 'iptraf' only worked for local addresses f

[go-nuts] Re: Go 1.10 release candidate 1 is released

2018-01-26 Thread Denis Cosmin
Yay! On Thursday, January 25, 2018 at 11:26:42 PM UTC+2, Andrew Bonventre wrote: > > Hello gophers, > > We have just released go1.10rc1, a release candidate of Go 1.10. > It is cut from release-branch.go1.10 at the revision tagged go1.10rc1. > > Thank you to everyone who has helped to test Go 1

Re: [go-nuts] Multiple-Deminisional Array Declaration

2018-01-26 Thread Sebastien Binet
pradam, you need to create a new type that aggregates a (presumably) integer and a string. type Animal struct { Value int Name string } data := []Animal{{12,"cat"}, {42, "feline"}} hth, -s On Fri, Jan 26, 2018 at 6:38 PM, pradam wrote: > Hi Gophers, > > I'm Newbie to Go, I have List

[go-nuts] Multiple-Deminisional Array Declaration

2018-01-26 Thread pradam
Hi Gophers, I'm Newbie to Go, I have List of Tuple in python as you see below *data = [* *(435347,'cat'),(435347,'feline'),(435347,'lion'), (6765756,'dog'),(6765756,'hound'),(6765756,'puppy'), (435347,'kitten'),(987977,'frog')]* i have googled it but everywhere th

Re: [go-nuts] Difficulties Using golang.org/x/net/html

2018-01-26 Thread Andy Balholm
The prescription is correct; the diagnosis is close but not exactly right. The html package actually doesn’t pay any attention to the XML-style self-closing tag syntax. It accepts it, in accordance with the HTML5 spec, as an alternate style of opening tag, but it never closes an element just bec

[go-nuts] Re: Code-base Refactoring Tool for Go , Move files from packages to sub packages

2018-01-26 Thread leon.sun via golang-nuts
Forgive my dull, I'm not seeing the connection between the question and the following discussion. Could anyone enlight me how to resolve this (or what conclusion we have gotten from the discussion)? On Tuesday, December 13, 2016 at 9:58:00 PM UTC+8, jis...@hifx.co.in wrote: > > > > http://stacko

[go-nuts] Go 1.10 release candidate 1 is released

2018-01-26 Thread michael . a . nikitochkin
Magic -- 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 https://groups.google.com/d/optout.

[go-nuts] projects using net/http

2018-01-26 Thread Keith Brown
Are there any open source projects which use net/http exclusively? I am building something and would like to follow the best practices of a project. I need to visualize a lot of json data in a form of tables/charts. -- You received this message because you are subscribed to the Google Groups