[go-nuts] [RFC][Gomobile] Wrote a series of posts on Gomobile

2019-04-23 Thread Girish Koundinya
Hello! I didn't find a lot of literature on Gomobile, so I decided to write about what Gomobile is and how it works. Any feedback is welcome :) https://blog.koundinya.xyz/series/gomobile/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-23 Thread Robert Engels
Why? You have saved 5 characters for no practical gain. I think you would enjoy Ada. > On Apr 23, 2019, at 8:05 PM, lgod...@gmail.com wrote: > > It sure would be nice if Go syntax allowed programmers to replace > > if ( test) { > ...do sonething > } else { > ..do something else > } > > with

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-23 Thread andrey mirtchovski
> ? (test) { > //...do something > } > { > //..do something else > } I believe the Go team considered this very carefully early on the language's development and came to the decision to use "if test" for "? (test)" and "} else {" for "}{" (without the implied newline). They also threw in "} else

[go-nuts] Go if else syntax .. suggested replacement

2019-04-23 Thread lgodio2
It sure would be nice if Go syntax allowed programmers to replace if ( test) { ...do sonething } else { ..do something else } with ? (test) { //...do something } { //..do something else } The ? operator can be anything the Go language team considers appropriate -- You received this message

Re: [go-nuts] ?? Does anyone know of a good on-line doc that describes how Go Garbage Collection works .. My recent web searches proved fruitless

2019-04-23 Thread Robert Engels
Try this https://blog.golang.org/ismmkeynote > On Apr 23, 2019, at 5:46 PM, Wojciech S. Czarnecki wrote: > > On Tue, 23 Apr 2019 07:39:18 -0700 (PDT) > lgod...@gmail.com wrote: > >> all responses appreciated >> > >

Re: [go-nuts] ?? Does anyone know of a good on-line doc that describes how Go Garbage Collection works .. My recent web searches proved fruitless

2019-04-23 Thread Wojciech S. Czarnecki
On Tue, 23 Apr 2019 07:39:18 -0700 (PDT) lgod...@gmail.com wrote: > all responses appreciated > https://blog.plan99.net/modern-garbage-collection-911ef4f8bd8e?gi=da46a757afd3#.sue21l4x8 I hope this helps -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because

Re: [go-nuts] Go+ replacement

2019-04-23 Thread David Riley
> On Apr 23, 2019, at 12:52 PM, Darko Luketic wrote: > > But Twitter is a loose group of individuals, or does it have group > functionality now? Everything is done via #channels last time I checked. > I honestly very rarely use it, too small sized posts, it's very chaotic and > stuff you've

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

2019-04-23 Thread Constantin Konstantinidis
The result is equivalent but a micro-benchmark shows that pkg io is 3x faster. go version go1.12.2 windows/amd64 pkg: github.com/iWdGo/GoCompilerEfficiency/src/writestring BenchmarkFmtWriteString-4 50 2002 ns/op BenchmarkIoWriteString-4 200 635

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

2019-04-23 Thread Constantin Konstantinidis
$ git version git version 2.20.1.windows.1 $ go version go version go1.12.2 windows/amd64 $ git config -l | grep autocrlf core.autocrlf=true core.autocrlf=true Same issue remains intermittent. It is reproducible using git checkout -- Discarding changes sets default back to CRLF. I could not

Re: [go-nuts] Go+ replacement

2019-04-23 Thread Darko Luketic
But Twitter is a loose group of individuals, or does it have group functionality now? Everything is done via #channels last time I checked. I honestly very rarely use it, too small sized posts, it's very chaotic and stuff you've seen just now is gone after a reload and can't be found again. Also

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

2019-04-23 Thread whitehexagon via golang-nuts
Don't get me wrong, I strongly believe in storing user data safely, and especially passwords, hence my original question. But as I mentioned, I'm basically trying to protect a customers email address at this point. So if the attack vector I'm defending against is someone having direct access

Re: [go-nuts] Go+ replacement

2019-04-23 Thread David Riley
On Apr 21, 2019, at 9:02 PM, icod.d...@gmail.com wrote: > > I don't know about you but for me, even if there wasn't so much going on, > Google+ and the Go+ community was a source of info. > > Reddit is reddit, this whatever it is, is what it is, mewe can't replace > G+. > Facebook just

[go-nuts] ?? Does anyone know of a good on-line doc that describes how Go Garbage Collection works .. My recent web searches proved fruitless

2019-04-23 Thread lgodio2
all responses appreciated -- 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: Go+ replacement

2019-04-23 Thread Mandolyte
I think MeWe could do the job in a functional sense - but there is no reason for Go folks to go there in mass. I find that Reddit has most of the same links to info that G+ did... so I'm ok with it. I have accounts on both MeWe and Reddit already for other things... so yeah... On Sunday, April

[go-nuts] how to test main function coverage with different args

2019-04-23 Thread hui zhang
how to test main function coverage with different args to enhance coverage rate how to cover the red part ? for you can set args once a time func Test_main(m *testing.T) { main2() } go test -coverprofile coverage.cov -args xxx.conf go tool cover -html=coverage.cov -o coverage.html --

[go-nuts] Re: how to go test a daemon process

2019-04-23 Thread Miki Tebeka
You can run main in a goroutine, sleep for some time (or stress test the server) and then exit. On Tuesday, April 23, 2019 at 11:25:49 AM UTC+3, hui zhang wrote: > > I have daemon process, I try to test its coverage > > > func Test_main(m *testing.T) { >main() > } > > go test -coverprofile

[go-nuts] how to go test a daemon process

2019-04-23 Thread hui zhang
I have daemon process, I try to test its coverage func Test_main(m *testing.T) { main() } go test -coverprofile coverage.out -args xxx.conf since it is a daemon, I have to kill it to stop it kill or ctrl + c I got the coverage report coverage.out only 10B and of course , no