[go-nuts] Re: How do I update all direct and indirect dependencies in go.mod

2019-02-26 Thread Francis Chuang
cording to the > requirements of your direct dependencies. > > There is a proposal to make that easier here, along with some related > discussion: > > https://github.com/golang/go/issues/28424 > > Regards, > thepudds > > On Tuesday, February 26, 2019 at 7:43:18 PM UTC-5, Fra

[go-nuts] How do I update all direct and indirect dependencies in go.mod

2019-02-26 Thread Francis Chuang
I have dependencies (direct and some indirect) listed in my go.mod file. This was initially populated using `go ./...` after creating the go.mod using `go mod init`. I now want to upgrade the dependencies and the indirect dependencies in the go.mod file to their latest versions. If I run `go g

Re: [go-nuts] Dependency hell with Go modules

2019-01-17 Thread Francis Chuang
wrote: > > On Fri, Jan 18, 2019 at 07:18:41AM +1300, Justin Israel wrote: > > On Fri, Jan 18, 2019, 12:36 AM Francis Chuang > wrote: > > > > > Hey everyone, > > > > > > I was wondering if I can get some ideas on how to solve this > dep

[go-nuts] Dependency hell with Go modules

2019-01-17 Thread Francis Chuang
Hey everyone, I was wondering if I can get some ideas on how to solve this dependency problem with Go modules. I am using Go 1.11.4 on Linux (Windows Subsystem for Linux to be exact). The first part of the problem is that for one of my libraries, I am importing github.com/hashicorp/vault/api,

[go-nuts] Re: Should a program always exit in main()?

2017-02-08 Thread Francis Chuang
I made a mistake with my example. c.Start() needs to be a separate go routine because it is an infinite loop waiting for messages: go c.Start(). In that case, I am guessing an errors channel would be the best? Cheers, Francis -- You received this message because you are subscribed to the Googl

[go-nuts] Should a program always exit in main()?

2017-02-07 Thread Francis Chuang
I am working on a client library that starts a Kafka consumer to listen for messages from a kafka stream and run some user defined handlers.* I want the design to be "crash-only" as much as possible*, so will be avoiding cleanups during unexpected shutdowns. For example, here's a simple sketch:

[go-nuts] Re: Will database/sql leak memory if I don't call Close() and remove references to it?

2016-11-01 Thread Francis Chuang
Just some further questions. I think the easiest way would be to combine ksug and Chris' suggestions. I would prefer not having to maintain a wrapper for each database as we talk to quite a few different types of databases using database/sql. Does this some bullet proof? 1. Rotate usernames/pas

[go-nuts] Re: Will database/sql leak memory if I don't call Close() and remove references to it?

2016-11-01 Thread Francis Chuang
Hey all, Thanks for the discussion. I've opened https://github.com/golang/go/issues/17727 to see if it might be possible for database/sql to support rotating of username and passwords. As these are currently passed in through the DSN for all drivers, it might be generalized to support changing

[go-nuts] Will database/sql leak memory if I don't call Close() and remove references to it?

2016-10-31 Thread Francis Chuang
I want to use Vault to manage and rotate the usernames and passwords to my databases. If I open a connection: db, err := sql.Open("mysql", ""), and then later on, open a new connection due to the username/password being rotated: db, err = sql.Open("mysql