[go-nuts] Is there a way to force to pass some function or error check when Debugging?

2019-04-22 Thread hui zhang
I am debugging a linux server program in local mac machine. some code related to environment check , such as check mount point etc. I want to pass this check , how ? - I try it set return error var to nil. but it seems not working in devel for now. - I imagine to mock function, but

Re: [go-nuts] Re: built-in alternative to bcrypt?

2019-04-22 Thread Tom Mitchell
On Mon, Apr 22, 2019 at 1:18 PM whitehexagon via golang-nuts < golang-nuts@googlegroups.com> wrote: > Thanks everyone, plenty more reading for me! > > The argon2 looks interesting, but it sounds like it could be very memory > heavy. The code I'm porting is running on a PAAS/SAAS setup, and

Re: [go-nuts] Re: built-in alternative to bcrypt?

2019-04-22 Thread Sam Whited
On Mon, Apr 22, 2019, at 20:18, whitehexagon via golang-nuts wrote: > Also good to know only what I'm using gets linked in, but then the > size of 'hello world' is even more surprising. That's because the runtime is being linked in. Go requires, among other things, a garbage collector and

Re: [go-nuts] why does reading a file on windows add CRLF to unix line endings... sometimes?

2019-04-22 Thread Dan Kortschak
Solved. This is Travis being "helpful" and setting core.autocrlf=true in git config. https://travis-ci.community/t/files-in-checkout-have-eol-changed-from-l f-to-crlf/349/4 On Tue, 2019-04-23 at 07:50 +0930, Dan Kortschak wrote: > I have a test that is failing on travis on a windows build due to

[go-nuts] why does reading a file on windows add CRLF to unix line endings... sometimes?

2019-04-22 Thread Dan Kortschak
I have a test that is failing on travis on a windows build due to the presence of CRLF in the bytes returned by ioutil.ReadFile. The file itself uses unix line endings, so the CR is inserted by something somewhere along the line. However, this is not always the case. On AppVeyor, I do not see

Re: [go-nuts] Re: Mutual tls example

2019-04-22 Thread Vasiliy Tolstov
пн, 22 апр. 2019 г. в 20:06, Timothy Raymond : > > I believe Liz Rice covered this in her GopherCon 2018 talk on TLS > connections: https://www.youtube.com/watch?v=kxKLYDLzuHA > Thank you this is very helpful for me. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this

[go-nuts] Re: built-in alternative to bcrypt?

2019-04-22 Thread whitehexagon via golang-nuts
Thanks everyone, plenty more reading for me! I'm also pleased to discover the increasing binary size isn't being ignored by the team :) especially since I'm also planning some more Go WASM stuff (although currently I switched to Java WASM for exactly this reason for that part of the

[go-nuts] Re: Does fmt.Fprint use WriteString ?

2019-04-22 Thread codiglot
Actually, that comment points to the implementation of WriteString for the fmt package's internal pp type, which in turn is used by other fmt functions to handle strings efficiently. After scanning that source file some more, and the source file for io.WriteString (

[go-nuts] Re: Mutual tls example

2019-04-22 Thread Timothy Raymond
I believe Liz Rice covered this in her GopherCon 2018 talk on TLS connections: https://www.youtube.com/watch?v=kxKLYDLzuHA On Sunday, April 21, 2019 at 8:09:17 AM UTC-4, Vasiliy Tolstov wrote: > > Hi, I'm try to find mutual tls example in go, but can't find simple > example that uses

Re: [go-nuts] built-in alternative to bcrypt?

2019-04-22 Thread Sam Whited
On Mon, Apr 22, 2019, at 10:14, whitehexagon via golang-nuts wrote: > I am concerned about the Go binary size, since I'm already at 15MB! So > I'm trying to limit external dependencies as much as possible. Staying in the standard library won't help you here. You'll still have to link in the code

[go-nuts] Re: built-in alternative to bcrypt?

2019-04-22 Thread lgodio2
Try scrypt at github.com/elithrar/simple-scrypt . It's not a 'standard lib' item, but I've found the authors code easy to implemented as 'package main' code vs 'package' code On Monday, April 22, 2019 at 6:14:48 AM UTC-4, whiteh...@googlemail.com wrote: > > I'm porting some code over to

[go-nuts] Re: Working outside of VCS - parent/child modules

2019-04-22 Thread whitehexagon via golang-nuts
Thank you for taking the time for a thoughtful response, it's good to get some context about why things are as they are. Previously I have worked in large organisations were most projects were using a single repo for a given project, with multiple projects spread across many departments. So a

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread L Godioleskky
Thanks guys for the cogent clarifications..I will now forget about converting to float32 on 64-bit CPUs I'm in the process of converting my often-used C-code apps to Go because I see tremendous advantages of Go vs C. I've been using C,C++ for many years and only recently discovered Go... My Go

[go-nuts] Go Profiling helper extension for VSCode

2019-04-22 Thread mediamax . info
Hello, we have published our first version of VSCode extension to help in profiling of your benchmarks. This is a first test version. Please post your feedback here. marketplace link: https://marketplace.visualstudio.com/items?itemName=MaxMedia.go-prof -- You received this message because

[go-nuts] callgraph: unclear calls in the output of callgraph tool

2019-04-22 Thread ildar97 . 97
Hi everyone. I came across some unclear result when used callgraph to analyze go-ethereum project. Could you give me a clue to find an explanation, please? I used these commands to generate reports: 1. rta analysis: callgraph github.com/ethereum/go-ethereum/cmd/geth >

[go-nuts] Re: golang type casting from interface int32 to int

2019-04-22 Thread gr . sasikala477
You have to convert int 32 to int . On Wednesday, October 9, 2013 at 12:41:03 AM UTC+5:30, Tong Sun wrote: > > Hi, > > I'm trying to assign a variable of type interface {} int32 to another > variable > of type int, and here are the all the errors that I'm getting: > > - cannot use id (type

[go-nuts] Re: built-in alternative to bcrypt?

2019-04-22 Thread bucarr
I'm a hobbiest new to Go as well. In the x library (still part of the standard library) written by the Go Authors is argon2. It allows for salting, stretching and hashing passwords. The recent guru commentary I've read is that "new implementations of applications which will use password

[go-nuts] Re: Does fmt.Fprint use WriteString ?

2019-04-22 Thread Constantin Konstantinidis
fmt.Fprint is calling io.WriteString as you can this comment and the code around indicates. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread Marvin Renich
* lgod...@gmail.com [190421 21:56]: > ?? On 64-bit CPUs does anyone have any experience comparing the run-time > speed of float64 based calculations vs float32 ? > > Some of my C-code when translated to Go-code seems to run noticeably > slower, so I'm wondering if I can speed things up by

[go-nuts] Re: Working outside of VCS - parent/child modules

2019-04-22 Thread thepudds1460
You do have the option to nest one module within another module in the same repo, but from what I have seen, that is usually not what one wants to do, and especially not to start. It can be tricky to set up correctly, and usually is more work on an on-going basis. The clearest statement I've

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread Marvin Renich
* lgod...@gmail.com [190422 01:57]: > I note that this issue has been dealt with in a previous post > https://groups.google.com/forum/#!topic/golang-nuts/n12khle-mlY > The gist of which seems to suggest that 32-bit is faster than 64 That thread was specific to integer remainder (%) and is

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-22 Thread Robert Engels
The email you cite is for integers. Integer math is not performed by the fpu - so it is not the same. > On Apr 22, 2019, at 12:57 AM, lgod...@gmail.com wrote: > > I note that this issue has been dealt with in a previous post > https://groups.google.com/forum/#!topic/golang-nuts/n12khle-mlY >

Re: [go-nuts] built-in alternative to bcrypt?

2019-04-22 Thread Aldrin Leal
Hashing passwords without salt are prone to rainbow table attacks. I particularly like this comment in a Java Source Code: https://github.com/apache/shiro/blob/f782eb1084df73eff3e2ac0f9780cb4a4f429041/core/src/main/java/org/apache/shiro/authc/credential/HashedCredentialsMatcher.java#L56 When

[go-nuts] favorite retry libraries

2019-04-22 Thread Joseph Lorenzini
Hi all, I am looking for a simple retry library that supports exponential backoffs and cancellation via context. I have found several but nothing is standing out for me. I was curious to see what experience people have had with the various retry libraries out there and what you'd recommend and

[go-nuts] built-in alternative to bcrypt?

2019-04-22 Thread whitehexagon via golang-nuts
I'm porting some code over to Go, and currently looking at some password hashing. I'm wondering if there is a 'standard library' alternative to using bcrypt? I am concerned about the Go binary size, since I'm already at 15MB! So I'm trying to limit external dependencies as much as possible.