[go-nuts] Re: Where is the middle of Brazil?

2019-11-30 Thread Rodolfo Azevedo
Bixo vai dormir, isso né hora pra loucura não... hehehehehe Em sábado, 30 de novembro de 2019 21:30:33 UTC-4, JuciÊ Andrade escreveu: > > When I was a kid I asked my teacher why my country capital had been moved > from Rio de Janeiro to Brasilia. She said the reason was Brasilia is right > in t

[go-nuts] Connect to a mainframe

2017-03-28 Thread Rodolfo Azevedo
Someone has an example to how to connect to a mainframe? I am searching in the web and not found. Thanks and regards, Rodolfo Azevedo -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiv

[go-nuts] Re: NewTicker function example

2017-02-22 Thread Rodolfo Azevedo
You can use sync WaitGroup too https://play.golang.org/p/bb3a6t1N-C But WILL NOT WORK ON playground, because of limitations of time package on playground. Regards. Em quarta-feira, 22 de fevereiro de 2017 21:39:12 UTC-4, Keith Brown escreveu: > > Oddly, I can't find a single example on the wo

[go-nuts] Re: NewTicker function example

2017-02-22 Thread Rodolfo Azevedo
Like this? https://play.golang.org/p/rXPl7Bco0c Em quarta-feira, 22 de fevereiro de 2017 21:39:12 UTC-4, Keith Brown escreveu: > > Oddly, I can't find a single example on the world wide web for what I am > trying to do. > > I have 2 functions which I want to run on a periodic basis. The functio

[go-nuts] Re: time.Sleep and sync.WaitGroup strange behavior

2017-01-21 Thread Rodolfo Azevedo
Thanks all, Peter Wang, I see the same thing, but Dave Cheney link explain, this is a fake time on playground. Thanks team :D Em sábado, 21 de janeiro de 2017 05:41:54 UTC-4, Dave Cheney escreveu: > > The playground fakes time, which may explain what you see. > https://blog.golang.org/playgro

[go-nuts] time.Sleep and sync.WaitGroup strange behavior

2017-01-20 Thread Rodolfo Azevedo
Hi all, I have a question, interesting: Why the executes is diferente in these both situations? Execute A: [11:19] ```package main import ( "fmt" "sync" "time" ) var wg sync.WaitGroup func A() { time.Sleep(time.Second * 5) fmt.Println("Função A") wg.Done() } fun

[go-nuts] Re: HTTP Server - Force close connection after response

2017-01-16 Thread Rodolfo Azevedo
You can use defer: defer bufrw.Flush() defer conn.Close() It will close after method finishs, but I do not know if it will work for you because you using go routines to start server, I never see this, I always use: log.Fatal(http.ListenAndServe(":8080", mux)) Well, I think you can try. Em