[go-nuts] sql/driver: why the Result.LastInsertId method doesn't follow the Go's style for Initialisms?

2017-04-20 Thread ariel
While working with the driver package, I had to implement the Result interface. my first instinct was to write the LastInsertId method as "LastInsertID", but then the build failed and I figured out what was the problem. What's the reason that the Result interface doesn't follow the Go's style

Re: [go-nuts] ent: an entity framework for Go

2019-10-03 Thread Ariel Mashraki
Yes. PostgreSQL support will be added soon. You can track its progress in our roadmap to v1 - https://github.com/facebookincubator/ent/issues/46 On Thursday, October 3, 2019 at 7:52:01 PM UTC+3, Marcin Romaszewicz wrote: > > That looks very nice, congrats! I like that it's simple and doesn't try

[go-nuts] labeled loop vs for statement inlining

2016-08-29 Thread Ariel Mashraki
Hello, Running `go build -gcflags -m` on the given code below will produce: main.go:3: can inline f1 main.go:24: inlining call to f1 Can someone please explain why doesn't the f2 function get inlined ? Thanks package main func f1() int { i := 0 loop: if i > 10 {

Re: [go-nuts] labeled loop vs for statement inlining

2016-08-29 Thread Ariel Mashraki
I didn't know it has more levels. thanks On Monday, August 29, 2016 at 6:09:19 PM UTC+3, Sam Whited wrote: > > On Mon, Aug 29, 2016 at 9:40 AM, Ariel Mashraki > > wrote: > > Can someone please explain why doesn't the f2 function get inlined ? > > If you buil

[go-nuts] Getting syntax-error on from assignment in if statements

2020-10-15 Thread Ariel Mashraki
Giving these 2 statements (in main function), the first passes and the second causes a parse-error. type T struct{} func (T) F() bool { return true } func main() { v := T{}.F() // works if v := T{}.F(); v {} // syntax error: cannot use v := T as value } I went over the grammar rules of the "If

Re: [go-nuts] Re: Getting syntax-error on from assignment in if statements

2020-10-15 Thread Ariel Mashraki
Good to know that. Thanks for your response Ian. On Thursday, October 15, 2020 at 6:42:33 PM UTC+3 Ian Davis wrote: > On Thu, 15 Oct 2020, at 4:16 PM, Brian Candler wrote: > > It looks like a parsing ambiguity to me. The error suggests that the > open-brace is being treated as the start of th