[go-nuts] Re: [Proposal] database/sql: add interface that unite DB and Tx

2020-01-16 Thread Tamás Gulácsi
2020. január 16., csütörtök 8:20:17 UTC+1 időpontban Shulhan a következőt írta: > > ## Problem > > At some point we have a function that receive an instance of database > connection to query rows in specific table. > > Let's say that function F() accept DB that query table T. > > If function

[go-nuts] Re: [golang-dev] Do slice element modification operations check whether or not the modified elements are allocated on immutable zones?

2020-01-16 Thread T L
Glad to know this. Thanks for the info. On Thu, Jan 16, 2020 at 8:35 AM Ralph Corderoy wrote: > Hi Tapir, > > > Do slice element modification operations check whether or not the > > modified elements are allocated on immutable zones? > ... > > //var Golang = strings.Join([]string{"Go", "lang"},

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Robert Engels
Well said. > On Jan 16, 2020, at 9:58 AM, Michael Jones wrote: > >  > How global mindshare develops is something that I know quite a bit about > through leadership and engineering experience in multiple billion user > projects. > > One key lesson for me was that you reach a point where

[go-nuts] Re: ngrok/sqlmw: an abstraction for database/sql interceptors and middleware

2020-01-16 Thread Alan Shreve
Forgot to paste in an example, see below: func run(dsn string) { // install the wrapped driver sql.Register("postgres-mw", sqlmw.Driver(pq.Dirver{}, new(sqlInterceptor))) db, err := sql.Open("postgres-mw", dsn) ... } type sqlInterceptor struct {

[go-nuts] Re: ngrok/sqlmw: an abstraction for database/sql interceptors and middleware

2020-01-16 Thread Alan Shreve
And of course I forgot to include a link to the code as well. Sorry for all the messages. https://github.com/ngrok/sqlmw On Thu, Jan 16, 2020 at 5:19 AM Alan Shreve wrote: > Forgot to paste in an example, see below: > > func run(dsn string) { > // install the wrapped driver >

[go-nuts] Re: weak references

2020-01-16 Thread kirr
For the reference: https://godoc.org/lab.nexedi.com/kirr/neo/go/zodb/internal/weak and rationale: https://lab.nexedi.com/kirr/neo/blob/cb94be39/go/zodb/connection.go#L73-121 Kirill вторник, 5 марта 2013 г., 3:49:02 UTC+4 пользователь Dustin написал: > > > I've been looking around for some

[go-nuts] How to query mongodb dynamically using Go interface

2020-01-16 Thread afriyie . abraham
Hi, I have been trying to create a dynamic mongodb query using golang interface but the logical $or does not work. It only return a documents when the input matches the bson.M{"sNssais.sst": args[0].(int32), "sNssais.sd": args[1].(string)}. other matches like bson.M{"amfInfo.taiList.tac":

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread David Riley
I'll be interested to see how this trend goes when they FINALLY pull the plug on Python 2.7 and everyone who's been kicking the can down the road for the better part of a decade finally has to figure out which third-party libraries are breaking. Python is better for some things, Go better for

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Amnon Baron Cohen
https://www.benfrederickson.com/ranking-programming-languages-by-github-users/ -- 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

[go-nuts] Re: How to query mongodb dynamically using Go interface

2020-01-16 Thread afriyie . abraham
Hi, this is the JSON document in mongodb. { "sNssais": [{ "sst": 0, "sd": "string" }], "nsiList": [ "string" ], "ipv4Addresses": [ "198.51.100.1" ], "ipv6Addresses": [ "2001:db8:85a3::8a2e:370:7334" ], "amfInfo": {

Re: [go-nuts] Re: [Proposal] database/sql: add interface that unite DB and Tx

2020-01-16 Thread Andrew Houghton
This may be helpful. https://godoc.org/github.com/golang-sql/sqlexp#Querier On Thu, Jan 16, 2020 at 1:09 AM Tamás Gulácsi wrote: > 2020. január 16., csütörtök 8:20:17 UTC+1 időpontban Shulhan a következőt > írta: >> >> ## Problem >> >> At some point we have a function that receive an instance

[go-nuts] ngrok/sqlmw: an abstraction for database/sql interceptors and middleware

2020-01-16 Thread Alan Shreve
Hi golang-nuts - This is an abstraction that we needed at ngrok. It allows you to intermediate calls to a database/sql Driver just like a client-side grpc interceptor would. This makes it an excellent abstraction layer upon which to build instrumentation and other middleware-like functionality.

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Michael Jones
How global mindshare develops is something that I know quite a bit about through leadership and engineering experience in multiple billion user projects. One key lesson for me was that you reach a point where the audience you originally wanted to serve (or refocused to serve) has been served.

Re: [go-nuts] Re: How to query mongodb dynamically using Go interface

2020-01-16 Thread burak serdar
On Thu, Jan 16, 2020 at 9:08 AM wrote: > > Hi, > > this is the JSON document in mongodb. > { > "sNssais": [{ > "sst": 0, > "sd": "string" > }], > "nsiList": [ > "string" > ], > "ipv4Addresses": [ > "198.51.100.1" > ], > "ipv6Addresses":

Re: [go-nuts] How to query mongodb dynamically using Go interface

2020-01-16 Thread burak serdar
On Thu, Jan 16, 2020 at 8:03 AM wrote: > > Hi, > > I have been trying to create a dynamic mongodb query using golang interface > but the logical $or does not work. > It only return a documents when the input matches the bson.M{"sNssais.sst": > args[0].(int32), "sNssais.sd": args[1].(string)}. >

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Amnon Baron Cohen
Go was originally conceived as a niche language. And if it does what we need, then I don't think we need to be particularly bothered if other languages are more "popular". But when looking at language popularity, I am not sure that the number of google searches is the most meaningful metric.

Re: [go-nuts] Sybase SQLAnywhere driver for Unix systems

2020-01-16 Thread Chris Burkert
Hello, we are working on a pure Go implementation of the TDS protocol for https://github.com/SAP/go-ase (which is currently just a cgo driver). I am not sure if TDS is also understood by SQLAnywhere but if so, then this may help. I will see if I find more in the company and let you know. reda

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Robert Engels
Porsche’s sales are a tiny fraction of auto sales, but most in the industry consider it to be the best platform - and only wish they could emulate / afford to be in that conversation. > On Jan 16, 2020, at 2:10 PM, Liam wrote: > >  > Open source is a rapidly growing movement across

Re: [go-nuts] Unexpected evaluation order in a return statement with multiple operands

2020-01-16 Thread Jake Montgomery
I could not agree more with Axel's assessment, and wanted to emphisize it for any Go-noobs reading this. An important part of the go philosophy is to write code that is as clear and simple as possible. It is not about compact code, or 'clever' code. Code should be easy to understand, even when

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Liam
Open source is a rapidly growing movement across virtually all languages, but still a small minority of all software. So the Trends graph is more revealing than Github activity. Assembly language use on Github also increased by ~150% There's no question that Go use is growing rather quickly.

[go-nuts] Reusing tcp connections on tunnels

2020-01-16 Thread XXX ZZZ
Hello, I'm trying to write an application that will basically serve as a tunnel between some servers outside our network and our internal servers. For this I've started using a snippet that creates a tcp listener and then dials to a remote host. Code is shown here:

Re: [go-nuts] [Proposal] database/sql: add interface that unite DB and Tx

2020-01-16 Thread Marcin Romaszewicz
I have that exact interface in all of my DB code, and I never use sql.Tx or sql.DB directly. You don't need Go's libraries to adopt this at all, just use your own. On Wed, Jan 15, 2020 at 11:20 PM Mhd Shulhan wrote: > ## Problem > > At some point we have a function that receive an instance of

[go-nuts] Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Everton Marques
See Go steadly growing over the years: https://madnight.github.io/githut/#/stars/2019/4 -- 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

Re: [go-nuts] Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Eric S. Raymond
Everton Marques : > See Go steadly growing over the years: > > https://madnight.github.io/githut/#/stars/2019/4 Wait. #4 in GitHub populaity, pasr C++ and C. amd people are *complaining*? I've seen failure. This isn't it. -- http://www.catb.org/~esr/;>Eric S. Raymond --

[go-nuts] Re: Reusing tcp connections on tunnels

2020-01-16 Thread hao dong
I don't think every net.Dial() creates an actually tcp connection to a server, this func is just an abstract of system call. Desingers of Go are so clever that will not do this stupid thing. I think I will make a test of that. On Friday, January 17, 2020 at 4:07:28 AM UTC+8, XXX ZZZ wrote: >

[go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread JuciÊ Andrade
Liam has a point. Go is not attracting attention as it used to do. Go ceased to generate news. Other projects attracts attention by aggregating new features often. So there is always a flux of news about the project, news that attracts interest, that bring new users to the project. However,

Re: [go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Ian Davis
If the purpose of adding "killer features" is just to make Go more popular then I'm completely against it. That doesn't seem like a sustainable way of growing and retaining a community, who may just move onto the next killer feature in another language. I'm not even sure that explicitly growing

Re: [go-nuts] Future of Error Formatting in the Standard Library

2020-01-16 Thread Sebastien Binet
On Sun, Jan 5, 2020 at 2:34 PM Joseph Lorenzini wrote: > > Hi all, > > > In the Go 2: Errors Proposal (issue 29934), a decision was made to defer > error formatting changes and come up with a revised proposal for 1.14. I > believe 1.14 is close to being release but I have not seen a proposal. I