[go-nuts] Intentionally omitting requires in go.mod - alternative to multi-module repository?

2022-01-13 Thread Rodolfo Carvalho
ied something similar? Should I expect obvious problems for downstream consumers, like failed builds? Is there an alternative solution to be considered? Thanks, Rodolfo Carvalho PS: the module graph pruning <https://github.com/golang/go/issues/36460> from Go 1.17 <https://go.dev/d

Re: [go-nuts] Data race problem with mutex protected maps

2021-06-26 Thread Rodolfo
Try to use sync.RWMutex instead, you have more control when to read or write. Em sáb, 26 de jun de 2021 18:34, 'Dan Kortschak' via golang-nuts < golang-nuts@googlegroups.com> escreveu: > On Sat, 2021-06-26 at 23:26 +0100, Rory Campbell-Lange wrote: > > I'm trying to work out why I have a data

Re: [go-nuts] Re: High Performance REST API Framework.

2020-05-09 Thread Rodolfo
I liked this: https://gofiber.io/ For now, Its seems better to me. Em sáb., 9 de mai. de 2020 às 18:27, escreveu: > Hi there, > > I've had quite a success with https://github.com/gin-gonic/gin, super > fast and feels similar to lumen/laravel (php) and express (nodejs). > > Cheers, > Dimitrios

[go-nuts] Storing test cases in array of struct vs slice of struct

2019-12-23 Thread Rodolfo Carvalho
the array literal pattern appears more often than maps in tests in the Go tree: $ git grep -F '[]struct {' -- '*_test.go' | wc -l 742 $ git grep -F '[...]struct {' -- '*_test.go' | wc -l 38 $ git grep -F 'map[string]struct {' -- '*_test.go' | wc -l 11 Why and when would one put test case

[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

Re: [go-nuts] Golang library for - ORM & Schema Migration

2019-09-28 Thread Rodolfo
"First, nobody thinks that knowing ORM's query language absolves one from knowing SQL." Speak for yourself. If you a hard spring boot user you can get into this problem. Example: findAll = select * from entity This is have nothing with SQL. findAllBySomeProperty = select * from entity where

Re: [go-nuts] Re: The performance comparation of Golang and Java

2019-01-28 Thread Rodolfo
t remember :) Regards Rodolfo Azevedo Em seg, 28 de jan de 2019 às 21:16, Topget escreveu: > It will be better if someone could give me the example(s) to show the > advantage of Golang (vs Java). Thanks. > > 在 2019年1月25日星期五 UTC+8上午10:21:14,Topget写道: >> >> I have tested se

Re: [go-nuts] The performance comparation of Golang and Java

2019-01-24 Thread Rodolfo
You only checking speed, you need to check memory and cpu too. Java is faster because it allocate too much memory and If your tests during a lot of time you will see the performance degrade, Go in other hand grow and use less memory. My explanation is not complete, But I am a Java developer and

Re: [go-nuts] How to increase concurrent users in net/http

2019-01-14 Thread Rodolfo
Please, when you finish your workerpool can you share your code to me? I need to understand this. Thanks and Regards Rodolfo Azevedo Em seg, 14 de jan de 2019 às 10:16, Kasun Vithanage escreveu: > I've deleted original post because it seems a problem with my code, will > try

Re: [go-nuts] Re: What are the reasonable reasons to use pointers?

2019-01-02 Thread Rodolfo
to u I am not golang expert, but I think this is one possible answer. Regards. Rodolfo Azevedo Em qua, 2 de jan de 2019 às 11:33, shankar shivanna escreveu: > > no idea, please help > > On Tuesday, 1 January 2019 17:04:34 UTC+5:30, 伊藤和也 wrote: >> >> What are the r

Re: [go-nuts] Is it possible to launch a Meltdown or Spectre attack with Go code?

2018-01-05 Thread Rodolfo
https://www.debian.org/security/2018/dsa-4078 2018-01-05 6:49 GMT-04:00 Wojciech S. Czarnecki : > On Thu, 4 Jan 2018 19:35:59 -0800 (PST) > "'Eric Johnson' via golang-nuts" wrote: > >> Anyone have any insight into whether it is possible to launch a

Re: [go-nuts] NullTime in sql package ?

2017-12-10 Thread Rodolfo
I prefer to work with milliseconds, this is suitable in any language, os and applications. 2017-12-10 17:26 GMT-04:00 Liviu G : > Does anyone know why we don't have a NullTime like NullString in > database/sql package ? > We shouldn't need to copy/paste this code in various

Re: [go-nuts] Easiest way to work with database

2017-10-21 Thread Rodolfo
Vickey, you can work with timestamps, to me is the easiest way to work with time data in any language and framework, because always an Int value :D Good Luck! 2017-10-21 21:35 GMT-04:00 : > HiShawn, > > I just want to know say i have a test table in postgres. With 2

Re: [go-nuts] Choosing a framework

2017-09-09 Thread Rodolfo
https://echo.labstack.com/ 2017-09-09 19:51 GMT-04:00 Tim Uckun : > I am in the process of learning go and decided to do it by writing a > (mostly) API based web site. I have been doing some research and have found > the following. > > Revel: https://revel.github.io/ >

Re: [go-nuts] Connect to a mainframe

2017-03-28 Thread Rodolfo
Hi, not work for me, show this error: package ibm.com/mainframe: unrecognized import path "ibm.com/mainframe" Can you help me? Thanks 2017-03-28 18:03 GMT-04:00 Aram Hăvărneanu : > go get ibm.com/mainframe > -- You received this message because you are subscribed to the

Re: [go-nuts] Connect to a mainframe

2017-03-28 Thread Rodolfo
Thanks for fast answer :D 2017-03-28 18:03 GMT-04:00 Aram Hăvărneanu : > go get ibm.com/mainframe > -- 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

[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

[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

[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

[go-nuts] Why is ioutil.Discard implemented using an int and not an empty struct?

2016-10-17 Thread Rodolfo Carvalho
(p), nil } What's the advantage of using an int in this case, if any? Thank you, Rodolfo Carvalho -- 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 g

Re: [go-nuts] image: algorithm to convert to grayscale

2016-09-29 Thread Rodolfo Carvalho
Thanks everyone for the answers and links. I computed a pixel-to-pixel difference and indeed what I was getting was -1/+1 differences in the gray values, due to rounding. Next free time I'll try the other formulas. Thank you again, Rodolfo Carvalho On Thu, Sep 29, 2016 at 6:12 AM, Micky

[go-nuts] image: algorithm to convert to grayscale

2016-09-28 Thread Rodolfo Carvalho
#expand_body_buiz8mj-9 [6] Octave: https://sourceforge.net/p/octave/image/ci/default/tree/inst/rgb2gray.m#l43 Thanks, Rodolfo Carvalho -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving e

[go-nuts] Re: how to restrict the program run only one instance

2016-09-17 Thread Rodolfo Amaral
I know this topic is a bit old, but I needed it recently on Windows and I'll post here how I did it in case someone else needs. I used Windows mutex as described by ankurg...@gmail.com: var ( kernel32= syscall.NewLazyDLL("kernel32.dll") procCreateMutex =