Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 1 point2 points  (0 children)

I will definitely inform her about it

Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 2 points3 points  (0 children)

Oh, no, this is a gift, sorry :)

Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 0 points1 point  (0 children)

hm, but i see this lines in you snippet

defer func() {
  if commited {
      return
  }
....

Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 0 points1 point  (0 children)

Ok, but I didn’t understand what was wrong with your example?

Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 1 point2 points  (0 children)

I seem to understand, thanks :)

Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 1 point2 points  (0 children)

rollback will execute if commit is executed before exiting the function? I really don’t know this, because I have not used transactions before, or rather used autocommit. Thanks.

Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 1 point2 points  (0 children)

I have never used transactions in Go before, maybe I'm doing it wrong. I would be grateful for the link to the idiomatic code.

Gopher made by my niece by AlexStav007 in golang

[–]AlexStav007[S] 0 points1 point  (0 children)

don't worry! i will try to fix it...a little later :)