Re: [go-nuts] How to find optimal value for GOGC?

2017-11-17 Thread Wojciech S. Czarnecki
On Thu, 16 Nov 2017 09:26:05 -0800 (PST) Christian LeMoussel wrote: > Go has the GOGC variable, that can also be controlled with the > SetGCPercent function in the runtime/debug package. > Is it possible to find the optimal value of GOGC to get the most op / s per > report

[go-nuts] Re: How to find optimal value for GOGC?

2017-11-17 Thread Christian LeMoussel
Interesting article. However, it does not describe the script/bench to find the best value, from 100 to 20,000, in increments of 100. -- 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

Re: [go-nuts] acme, letsencrypt and different HTTPS ports

2017-11-17 Thread Shulhan
On Thu, 16 Nov 2017 20:59:16 -0800 (PST) Sankar wrote: > Hi > > I have an EC2 vm where I want to run two go https servers on > different ports. > > I am using letsencrypt for the certificates and the code is like: > > server1.go: >

[go-nuts] Large number of goroutines on PowerPC

2017-11-17 Thread Conrado PLG
Hi, I'm working on a software for a 32-bit PowerPC processor. Since there is no Go support for it, I'm using gccgo. However, I've noticed that it's not possible to use a large number of goroutines since each one takes around 2 MB of memory. From what I understand, this is the stack space

[go-nuts] Re: [crypto/aes] How do I specify an initialization vector?

2017-11-17 Thread Chetan Gowda
Thank you, Conrado. That indeed fixed it. -- 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

[go-nuts] Re: test debugging woes

2017-11-17 Thread Alex Buchanan
Some ideas: - I assume the code isn't public? If it is, you might share it - Are you running `go test -v` for verbose logging? - Try fmt.Printf - Try adding printing lines at points down the stack leading up to the point you think is failing, to make sure the code is actually running. - Put a

[go-nuts] context.C and context.BG

2017-11-17 Thread Alex Buchanan
I don't have numbers, but context must be one of the most commonly used imports/types in my code. It shows up many function signatures. We try to use it for all cancelation. Would it make sense to add an alias "C" to the type "Context"? And maybe "BG" for Background()? Also, is there a

Re: [go-nuts] Re: invitation to gophers.slack.com

2017-11-17 Thread Jonathan Yu
Go here to request an invite: https://invite.slack.golangbridge.org/ On Fri, Nov 17, 2017 at 7:16 AM, Matteo G. wrote: > Hi, I don't understood how I can sign up to ghopers.slack.com. Some > suggestion? > > -- > You received this message because you are subscribed to the

[go-nuts] Easy access to #golang

2017-11-17 Thread Sam Whited
Hi all, I don't like signing up for accounts, or having to jump through hoops (even if they're relatively straight forward hoops) to get an invite to something that should just be public. Also, some people seem to like web clients, so here's a quick and easy way to access the #golang channel on

Re: [go-nuts] fatal error: sweep increased allocation count, go1.9.x

2017-11-17 Thread matthewjuran
https://github.com/golang/go/issues/22781 I'll try to put together an easier failing case with less code and without the database. Thanks for the help. Matt On Thursday, November 16, 2017 at 3:52:56 PM UTC-6, Ian Lance Taylor wrote: > > On Thu, Nov 16, 2017 at 11:28 AM,

Re: [go-nuts] Large number of goroutines on PowerPC

2017-11-17 Thread Ian Lance Taylor
On Fri, Nov 17, 2017 at 3:31 AM, Conrado PLG wrote: > > I'm working on a software for a 32-bit PowerPC processor. Since there is no > Go support for it, I'm using gccgo. However, I've noticed that it's not > possible to use a large number of goroutines since each one takes

[go-nuts] Should net.Conn transform function retain the original data segmentation?

2017-11-17 Thread Xiaoyi Shi
Hi all, To clarify, a net.Conn transform function transforms data write to/read from a connection, an example is as follow: type TransformedConn struct { net.Conn} func (c *TransformedConn) Read(p []byte) (int, error) { n, err := c.Conn.Read(p) transform(p) return n, err} func (c

[go-nuts] Re: test debugging woes

2017-11-17 Thread deparker
You could try using Delve (https://github.com/derekparker/delve) to actually step through and inspect the process during execution to avoid having to put print statements everywhere. Similar to the Go command, you can run `dlv test` and begin stepping through your test binary. On Thursday,

[go-nuts] test debugging woes

2017-11-17 Thread DV
I wish I could help you, but your description of the problem could not be more vague. Your post can be rewritten as "problem pls help". What library is this? Is it on GitHub? Can we look at it? What section of code is returning nil? Is nil the problem? Or is there a panic? What's your code

[go-nuts] Flagging lazy-loaded fields as being unsafe to access directly

2017-11-17 Thread Traun Leyden
I'm trying to figure out a way to best signal to other developers maintaining a single package that a field is unsafe to access directly. In this case, it's being lazily loaded, and the only way to ensure it will be properly loaded is to access the method wrapper rather than directly

[go-nuts] Google Cloud Golang SDK authentication

2017-11-17 Thread SALMAN AHMED
I am trying to automate the VM and Network resource creation using GCD Client API. I do not want to use Google OAuth as the user has to generate token every time. I used AWS SDK and it can be invoked by simply using AccessKey and Secret Key. Is there any authentication method that does not

[go-nuts] Re: Flagging lazy-loaded fields as being unsafe to access directly

2017-11-17 Thread Nicholas Hanley
In Go, lowercase identifiers are not visible outside the package in which they are defined (ref: Exported identifiers ). Your example declares foo in the main package but I assume your real code would be in its own package. What you can do is

[go-nuts] Automation of Compute VM and Network Resource Creation

2017-11-17 Thread salmanbukhari512
I am working on an application which creates VM's and Network Resources on GCD and other clouds. In AWS you can create resources using AccessKey and SecretKey. I don't want any interaction to Google's OAuth for the requests I send to create resources. What kind of authentication method should I

[go-nuts] Bug report github.com/golang/glog

2017-11-17 Thread Brian Kennedy
For the flag "log_backtrace_at" the flag expects "" for an empty value when calling Set(), but .String() will return ":0" when the value is empty. This results in a different "emtpy" value being generated by String() than is accepted by Set(). The following code will reproduce the issue. *Output

[go-nuts] Re: context.C and context.BG

2017-11-17 Thread me via golang-nuts
I've found a hint. Apparently, both context.TODO and context.Background share a common implementation but they need distinct addresses. See https://golang.org/src/context/context.go#L168 So they cannot be constants because then they would not have an address. They cannot be variables because

[go-nuts] Re: invitation to gophers.slack.com

2017-11-17 Thread Matteo G.
Hi, I don't understood how I can sign up to ghopers.slack.com. Some suggestion? -- 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