[go-nuts] [ANN] astits: parse and demux MPEG Transport Streams (.ts) natively in GO

2017-11-19 Thread Asticode
Hey guys, I'm happy to announce go-astits, a Golang library to parse and demux MPEG Transport Streams (.ts) natively: https://github.com/asticode/go-astits It allows you to either retrieve raw packets or event better retrieve complex data spanning over multiple packets. Let me know what you th

Re: [go-nuts] My trouble of local package referencing

2017-11-19 Thread 'Axel Wagner' via golang-nuts
On Mon, Nov 20, 2017 at 5:03 AM, Ally Dale wrote: > > 4. "#/xxx" style reference seems a best solution like "vendor" to fix > local-package reference problem. > Without any hard code "where I am" exists in any go files. > And it will works well together with current global-style, because "#" will

Re: [go-nuts] Puzzle: make a sync.Once fire more than once

2017-11-19 Thread Daniel Skinner
I'd note the following: https://play.golang.org/p/U_lmt-go6M Also, this can be simplified to the following: https://play.golang.org/p/eFnM98yRLk Such a puzzle should look something more like: https://play.golang.org/p/8KD6INL9QP On Sun, Nov 19, 2017 at 6:25 PM Carl Mastrangelo wrote: > Hi gop

[go-nuts] Re: Flagging lazy-loaded fields as being unsafe to access directly

2017-11-19 Thread Nate Finch
Just use a comment. That's usually fine. // this is lazy loaded, use getBar() instead of directly accessing. "Don't do that" is a surprisingly feasible solution to a lot of programming problems. Not everything has to be enforced by tooling. On Sunday, November 19, 2017 at 9:08:47 PM UTC-5, T

Re: [go-nuts] My trouble of local package referencing

2017-11-19 Thread Ally Dale
Thanks for replying all above. The main point of this topic is probably to discuss "what's the right way to manage local-only packages". 1. Axel has point out that "why local-packages is not necessary in golang" 2. Jake has given an effective way to use "vendor" path to fix local-refering problem

[go-nuts] Re: Flagging lazy-loaded fields as being unsafe to access directly

2017-11-19 Thread Traun Leyden
In this case I mean within the boundaries of a single package. I realize there is no way to enforce another package maintainer to call the method wrapper rather than the field directly, but I was wondering if people have come up with naming conventions such as a leading underscore to make it a

[go-nuts] Re: Puzzle: make a sync.Once fire more than once

2017-11-19 Thread Chris G
I've been tempted to reset the sync.Once inside the function, but I believe there's a subtle bug -- I'd be very interested to know if my understanding is incorrect. When Do() is called for the first time, it can aquire a mutex, and defers the unlocking until after the supplied function has comp

[go-nuts] Re: Easy access to #golang

2017-11-19 Thread Kevin Powick
On Friday, 17 November 2017 10:47:44 UTC-5, Sam Whited wrote: > > Hi all, > > I don't like signing up for accounts, or having to jump through hoops > (even if they're relatively straight forward hoops) to get an invite to > something that should just be public. Also, some people seem to like

[go-nuts] Puzzle: make a sync.Once fire more than once

2017-11-19 Thread Carl Mastrangelo
Hi gophers, I was playing around with a puzzle trying to break the sync package and found something cool. Can you think of a definition for f that causes once.Do to execute the argument more than once? package main import ( "sync" ) func main() { var once sync.Once var f = // .

Re: [go-nuts] Re: Parsing OpenSSH ed25519 private keys

2017-11-19 Thread Nurahmadie Nurahmadie
Correct, apologies I think I'm half asleep when I replied before. Please ignore my reply before. On Mon, Nov 20, 2017 at 12:16 AM, Anmol Sethi wrote: > That library will not work either. > > See https://github.com/fudanchii/edssh/blob/bd7d88fd1d85351bf598cdcd1fb7b0 > 4528cf42e2/keys.go#L44 > > >

Re: [go-nuts] Re: Parsing OpenSSH ed25519 private keys

2017-11-19 Thread 'Anmol Sethi' via golang-nuts
That library will not work either. See https://github.com/fudanchii/edssh/blob/bd7d88fd1d85351bf598cdcd1fb7b04528cf42e2/keys.go#L44 > On Nov 19, 2017, at 11:49 AM, Nurahmadie Nurahmadie > wrote: > > Hi Chandru, > > I made a library to support openssh ed25519 key format. > It can be used as a

Re: [go-nuts] Re: Parsing OpenSSH ed25519 private keys

2017-11-19 Thread Nurahmadie Nurahmadie
Hi Chandru, I made a library to support openssh ed25519 key format. It can be used as a drop-in replacement of `ssh.ParsePrivateKey` as shown here: https://github.com/fudanchii/edssh On Thu, Nov 16, 2017 at 11:43 PM, me via golang-nuts < golang-nuts@googlegroups.com> wrote: > x/crypto/ssh does s

[go-nuts] running 'dep init -gopath' on new project: what don't I get?

2017-11-19 Thread ossbsd
dep faq says: How do I make dep resolve dependencies from my GOPATH? dep init provides an option to scan the GOPATH for dependencies by doing dep init -gopath, Assuming these files exist $GOPATH/src/foo.com/lib/hello/hello.go $GOPATH/src/bar.com/prg/doit/main.go when I do the following

golang-nuts@googlegroups.com

2017-11-19 Thread as
Shouldn't vet complain about this? I see this type of thing mostly in closed-source code https://play.golang.org/p/zl3gYi7QlE -- 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