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

2018-01-30 Thread Jordan Krage
Try using `t.Logf` instead of `fmt.Printf`. On Saturday, January 27, 2018 at 6:03:13 AM UTC-6, Jérôme LAFORGE wrote: > > Of course, that was I already did. But I talk about the log into function > I want to test (in the example of playground: func IsBuggyEven) . > see: >

[go-nuts] Re: Badger Write Performance

2018-01-20 Thread Jordan Krage
Are you using 'SyncWrites=false'? (Or 'NoSync' with boltdb?) It looks like the badger benchmarks from github.com/dgraph-io/badger-bench do not sync. On Thursday, January 18, 2018 at 1:33:02 PM UTC-6, dc0d wrote: > > Badger write performance is a bit worse than boltdb. And badger suggests >

Re: [go-nuts] Re: do {} for x, why or why not?

2017-03-06 Thread Jordan Krage
The spec says 'keyword' are "reserved and may not be used as identifiers", so adding any new keyword would necessarily break existing programs which use that keyword as an identifier, regardless of restrictions on the keyword's use. Perhaps you mean a

[go-nuts] Re: Serve large files

2017-02-28 Thread Jordan Krage
Try using os.Open to get a *File (which implements io.Reader), and then io.Copy to the response from the file. On Tuesday, February 28, 2017 at 5:13:20 AM UTC-6, Jeffrey Smith wrote: > > I'm trying to server up a file that can be very large so would like to try > and stream the content back. >

[go-nuts] Re: Too many field tags, how to split definitions ?

2017-01-24 Thread Jordan Krage
As of Go 1.8, this should be easy. You can now convert between two structs which differ only in tags (1.8 release notes ), so you can have a separate struct definition for each type (json, bson, gorm, strom, etc.). On Tuesday, January 24, 2017 at

Re: [go-nuts] JSON decode streaming : Go forward when format is not json

2017-01-20 Thread Jordan Krage
> > Robustness brings complexity here. > Relevant: RFC7464 - JavaScript Object Notation (JSON) Text Sequences Given that format, it should be possible to parse record boundaries reliably, and then use the std lib to unmarshal them individually. On Friday,

[go-nuts] Re: [golang-dev] Binding receiver object to a method expression, to get a method value

2017-01-19 Thread Jordan Krage
Would a simple single method interface meet your needs? type fooer interface { foo() bool } func (a *A) foo() bool { ... } func bar(f fooer) { if f.foo() { ... } } func main() { a := { ... } bar(a) } On Wednesday, January 18, 2017 at 8:55:07 PM UTC-6, Bryan Chan

[go-nuts] Re: encoding/gob decode []byte to multi struct types

2017-01-18 Thread Jordan Krage
Actually, it looks like the int/int8 distinction doesn't matter for gob. > There is no int8, int16 etc. discrimination in the gob format; there are > only signed and unsigned integers. > https://golang.org/pkg/encoding/gob/ On Wednesday, January 18, 2017 at 8:43:27 AM UTC-6, Jordan Kr

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-10-27 Thread Jordan Krage
| I can vouch for this. It's especially embarrassing when you first mention it to them privately and resolve the issue, and then go ahead and mention it in the meeting anyway, or use it as an excuse for new policies set in that meeting. There is one particular space I left because of this, but

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-10-27 Thread Jordan Krage
this is not an appropriate analogy. On Thursday, October 27, 2016 at 10:49:46 AM UTC-5, Andrew Gerrand wrote: > > > > On 28 October 2016 at 02:24, Jordan Krage <jma...@gmail.com > > wrote: > >> Perhaps I was too broad in saying 'entirely public and transparent'. I >> did not mea

[go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-10-27 Thread Jordan Krage
ion. https://np.reddit.com/r/golang/comments/57w79c/why_you_really_should_stop_using_iris/d8wdynd/ On Thursday, October 27, 2016 at 10:24:26 AM UTC-5, Jordan Krage wrote: > > Perhaps I was too broad in saying 'entirely public and transparent'. I > did not mean to suggest that *reporters* sh

[go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-10-27 Thread Jordan Krage
, so that they may find nicer ways to express themselves. > > On Thursday, October 27, 2016 at 10:29:47 AM UTC-4, Jordan Krage wrote: >> >> At the very least, this kind of CoC 'enforcement' should be entirely >> public and transparent. How are others supposed to lear

[go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-10-27 Thread Jordan Krage
At the very least, this kind of CoC 'enforcement' should be entirely public and transparent. How are others supposed to learn what is considered a violation, when violators are only contacted privately by email? On Thursday, October 27, 2016 at 6:36:23 AM UTC-5, Aram Hăvărneanu wrote: > > I