[go-nuts] [JOB] Senior Developer openings at TreeTop Commons (Portland, OR, or remote for non-local within North America)

2019-04-18 Thread Aimee Levens
Hey everyone, I'm once again hiring Senior Developers as TreeTop Commons continues to grow! We've got three openings that were just posted: Sr API Developer, Sr Identity & Access Management Developer, as well as a Senior Front End Developer. It's a cool small-ish (company has ~28 employees)

[go-nuts] Re: Persistent memory support for Go

2019-04-18 Thread 'Jerrin Shaji George' via golang-nuts
Hi, Sorry I missed this email as I am not subscribed to email updates in this group. This project currently only supports being built on Linux 64 bit. It is being developed on a machine with Intel Optane DC Persistent Memory

Re: [go-nuts] Pointer based API and constants literals, how to best handle it?

2019-04-18 Thread whitehexagon via golang-nuts
Sure, I'm still learning Go, so it's probably more idiotic than idiomatic, but help yourself: https://github.com/WhiteHexagon/go2aws Peter On Thursday, 18 April 2019 18:03:05 UTC+2, Jim Ancona wrote: > > Is your Cognito provider open source? I might have a use for that/ > > Jim > > -- You

[go-nuts] Memory Freeing for C.String

2019-04-18 Thread Ashutosh Baghel
Hello Folks, Having some confusion for freeing memory allocated by C.String(). Filter_CSo my program is something like below. A. Should we just call C.Free after line 6 for Filter_C directly or defer is just fine. B. Currently we are expecting the user of fetchdata() to free the Context_C,

Re: [go-nuts] Re: methods on C types

2019-04-18 Thread Ian Lance Taylor
On Thu, Apr 18, 2019 at 9:17 AM Jan Mercl <0xj...@gmail.com> wrote: > > On Thu, Apr 18, 2019 at 6:07 PM Jamil Djadala wrote: > > > > On Thu, 18 Apr 2019 07:44:53 -0700 (PDT) > > peterGo wrote: > > > > > Cgo translates C types into equivalent unexported Go types. > > > https://golang.org/cmd/cgo/

Re: [go-nuts] Re: methods on C types

2019-04-18 Thread Jan Mercl
On Thu, Apr 18, 2019 at 6:07 PM Jamil Djadala wrote: > > On Thu, 18 Apr 2019 07:44:53 -0700 (PDT) > peterGo wrote: > > > Cgo translates C types into equivalent unexported Go types. > > https://golang.org/cmd/cgo/ > > > But then, definition of new methods on non-local types is forbidden. > Why it

[go-nuts] Closure Scope Bugs, one small trick/tip

2019-04-18 Thread Louki Sumirniy
I just ran into an issue with a closure inside a function that I originally created elsewhere with the same names as where I transplanted the closure definition, and it took me quite some time to root out all the references to the outer scope. Scope bleed and shadowing with closures is

Re: [go-nuts] Re: methods on C types

2019-04-18 Thread Jamil Djadala
On Thu, 18 Apr 2019 07:44:53 -0700 (PDT) peterGo wrote: > Cgo translates C types into equivalent unexported Go types. > https://golang.org/cmd/cgo/ But then, definition of new methods on non-local types is forbidden. Why it is enabled for cgo types ? -- Jamil Djadala -- You received this

Re: [go-nuts] Pointer based API and constants literals, how to best handle it?

2019-04-18 Thread Jim Ancona
Is your Cognito provider open source? I might have a use for that/ Jim On Wed, Apr 17, 2019 at 3:55 PM whitehexagon via golang-nuts < golang-nuts@googlegroups.com> wrote: > Thanks Jim, and for the sympathy :) I'm almost tempted to use the REST > API and bypass the SDK... I already implemented

[go-nuts] Re: 紧急!!中国一线互联网公司招聘云容器GO研发技术Lead

2019-04-18 Thread David Skinner
Thank you for the invite. I would be pleased to be of assistance. While I do not wish to relocate to Chine, I would very much like to visit. I am located in Arkansas USA and have some limited experience with Mandarin. On Wednesday, April 17, 2019 at 7:34:22 AM UTC-5, chandler song wrote: > > >

[go-nuts] [ANN] New package to convert loops into versions with concurrency

2019-04-18 Thread Robert Johnstone
Hello Everyone, I'd like feedback on a new package designed so that it is easy to convert loops into version with limited concurrency. The concurrency is limited in the sense that the number of tasks running in parallel is limited, but otherwise you should be able to convert any loop into a

Re: [go-nuts] how to get file's current offset

2019-04-18 Thread andrey mirtchovski
> offset, err := f.Seek(0, io.SeekCurrent) my code has been written so long ago i didn't even notice os.SEEK_CUR is deprecated :) -- 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,

Re: [go-nuts] how to get file's current offset

2019-04-18 Thread Valentin Vidic
On Thu, Apr 18, 2019 at 10:34:24PM +0800, sa517...@mail.ustc.edu.cn wrote: > I want to know file's current read offset after open a file, but I can not > found related API. > > f, err := os.Open("/tmp/") > if err != nil{ > panic(err) > } > >

Re: [go-nuts] how to get file's current offset

2019-04-18 Thread andrey mirtchovski
offset, err := f.Seek(0, os.SEEK_CUR) On Thu, Apr 18, 2019 at 8:50 AM wrote: > > I want to know file's current read offset after open a file, but I can not > found related API. > > > > > > f, err := os.Open("/tmp/") > if err != nil{ > panic(err) > } > > ... // some read

[go-nuts] how to get file's current offset

2019-04-18 Thread sa517067
I want to know file's current read offset after open a file, but I can not found related API. f, err := os.Open("/tmp/") if err != nil{ panic(err) } ... // some read operation // how can I get f's current read

[go-nuts] Re: methods on C types

2019-04-18 Thread peterGo
Cgo translates C types into equivalent unexported Go types. https://golang.org/cmd/cgo/ Peter On Thursday, April 18, 2019 at 2:25:11 AM UTC-4, dja...@gmail.com wrote: > > Hi, > where is documented that methods can be created on C types ? > > This works with go1.12.4, linux: >

[go-nuts] methods on C types

2019-04-18 Thread djadala
Hi, where is documented that methods can be created on C types ? This works with go1.12.4, linux: https://play.golang.org/p/gXpHCFOgDDg package main import ( "C" "fmt" ) func (i *C.int) Inc() { *i++ } func main() { var i C.int i.Inc() fmt.Println(i) } Thanks -- You