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
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 c
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
--
Yo
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
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 https://groups.google
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 isn'
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 t
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
$ 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 loca
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 n
> 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 see
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 yo
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
>>
>
> https://blog.plan99.net/modern-garbage-collection-911ef4f8bd8e?gi=da46a757af
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
> ? (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 i
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
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
You can use table driven test, see
https://github.com/golang/go/wiki/TableDrivenTests
On Tuesday, April 23, 2019 at 12:03:15 PM UTC+3, hui zhang wrote:
>
> 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
18 matches
Mail list logo