Re: [go-nuts] Analyse postgresql error

2022-10-27 Thread David Harel
Thanks. Exactly what I needed. On Wed, Oct 26, 2022 at 3:45 PM Konstantin Khomoutov wrote: > On Wed, Oct 26, 2022 at 01:38:51PM +0300, David Harel wrote: > > [...] > > func errorCheckResult(err error) string { > > if err == nil { > > return "

Re: [go-nuts] Analyse postgresql error

2022-10-26 Thread David Harel
plicate key value violates unique constraint "treatment_pk" {"Severity":"ERROR","Code":"23505","Message":".MoreStuff."}`) mockDB.EXPECT().AppointmentUpdate(gomock.Any(), gomock.Any()).Return(err) Any idea? On Tue,

[go-nuts] Analyse postgresql error

2022-10-21 Thread David Harel
Hi there, Newbie on golang. Using sqlc: https://github.com/kyleconroy/sqlc in the environment created by Karl Keefer: https://github.com/karlkeefer/pngr/actions/workflows/build.yml, thanks Karl. My queries use querier which is auto generated by sqlc. Sometime I get an error result in my query s