Hi,
We would like to be able to generate string to enum value method using
stringer in addition to String() method.
https://github.com/golang/tools/blob/master/cmd/stringer/stringer.go
Is this something that can be added to Stringer? If yes, what is the
process for that?
Thanks.
--
You receiv
This gets you https://play.golang.org/p/J8hFZyyFF8 about 25% perf boost:
BenchmarkDecode-8 3 43268 ns/op
BenchmarkUnmarshal-8 3 43195 ns/op
BenchmarkManual-8 5 30216 ns/op
Also, Decode/Unmarshal seem pretty equal.
If you don
Can someone recommend me a skeleton of how to handle file uploads via web
browser in Golang?
Added Bonus: Drag & Drop would be nice but I understand that this is likely
a HTML/Javascript issue.
Thank you!
--
You received this message because you are subscribed to the Google Groups
"golang-nut
Hello everyone!!
I tried to create one that can start, can graceful shutdown and manage
multiple services at the same time in Go language. Please try it :D
https://github.com/Code-Hex/golet
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To uns
Hello everyone!!
I tried to create one that can start, can graceful shutdown and manage
multiple services at the same time in Go language. Please try it :D
https://github.com/Code-Hex/golet
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To uns
On Thu, Feb 9, 2017 at 4:46 PM, wrote:
>
> I'll look into that api and maybe it will solve my problems. Though, to be
> understood I'm not asking for ARC, I'm asking for a keyword so the spec is
> compatible with ARC.
But you don't need a keyword to get weak pointers. Given the
existence of co
I expect you’re just left with the option of magic comments then, since there’s
not going to be much enthusiasm for adding a new do-nothing keyword to the
language.
Andy
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
> Maybe you could use “notwithstanding". It’s an ignored token in the default
> Go compiler, and a weak pointer is one that allows an object to be freed
> notwithstanding any weak references to it…
these are gone now: https://twitter.com/rob_pike/status/808784925402898432
--
You received this
On Fri, Feb 10, 2017 at 10:50 AM, wrote:
> It seems that all constants above are multiplied by 2^16 to allow the
> calculation to be performed with integer arithmetic, before being shifted
> back into an 8 bit range. But Y' is multiplied by 0x010100 which is
> equivalent to Y' * 2^16 + Y' * 2^8.
Have you tried go get -u path/... ?
--
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://grou
Bump. I'm interested to know as well.
On Wednesday, February 8, 2017 at 12:22:35 AM UTC-5, emarti...@gmail.com
wrote:
>
> Hello,
>
> I'm making a go code which is basically parsing a lot of small xml
> responses. I've noticed that right after I enable the parsing code, my R/S
> as per wrk, as
Thanks for the clarification.
On Friday, February 10, 2017 at 3:50:15 AM UTC+3:30, Ian Lance Taylor wrote:
>
> On Thu, Feb 9, 2017 at 4:16 PM, Sina Siadat > wrote:
> >
> > One thing I still don't understand is the cases when go:linkname is
> needed.
> > Why not just import that package, if
Maybe you could use “notwithstanding". It’s an ignored token in the default Go
compiler, and a weak pointer is one that allows an object to be freed
notwithstanding any weak references to it…
It’s not in the spec, though, so it might cause problems with other Go
implementations such as gccgo. I
I'll look into that api and maybe it will solve my problems. Though, to be
understood I'm not asking for ARC, I'm asking for a keyword so the spec is
compatible with ARC.
>
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe fro
Thx, that looks like an interesting paper.
--
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit http
On Thu, Feb 9, 2017 at 4:16 PM, Sina Siadat wrote:
>
> One thing I still don't understand is the cases when go:linkname is needed.
> Why not just import that package, if the function is exported. Is it only
> used for accessing unexported functions?
Yes.
It's primarily a hack that lets certain f
Thanks, Ian! I followed your advice and got it working. :)
I did two things: imported the hello package, and compiled/linked
everything using go-tool-compile/link instead of go-build command. The
go-build command fails, because it passes the -complete flag to the
compiler. I pushed the fix to t
On Thu, Feb 9, 2017 at 3:03 PM, oscaretu wrote:
>
> I've searching in Google and browsing and searching in the golang GitHub
> repository, but I've unable to find the markdown source code used to
> generate the HTML file effective_go.html
There isn't any. That file has always been written in str
Hi
I have been looking at go's implementation YCbCr to RGB conversion and
there are a few details that are not clear to me.
The implementation follows the JFIF spec
// The JFIF specification says:
// R = Y' + 1.40200*(Cr-128)
// G = Y' - 0.34414*(Cb-128) - 0.71414*(Cr-128)
// B = Y' + 1.77200
Hello!
I've searching in Google and browsing and searching in the golang GitHub
repository, but I've unable to find the markdown source code used to
generate the HTML file effective_go.html
In URL
https://github.com/golang/go/tree/master/doc
I see lots of files with extension ".html", but
Sounds good. I also have go-simplenote package. So I'll do it when I feel
like. :)
https://github.com/mattn/go-simplenote
On Thursday, February 9, 2017 at 8:18:15 PM UTC+9, Uvelichitel wrote:
>
> Synchronization with simplenote service https://simplenote.com/ may be
> very appreciated. simpleno
You can create a slice of the keys in any order you want and use that
to control the iteration. Map iteration is always randomized.
https://play.golang.org/p/yGDUNSFMSG
On Thu, Feb 9, 2017 at 1:08 PM, wrote:
> hi
> How can print MAP data without randomized?
>
> --
> You received this message be
hi
How can print MAP data without randomized?
--
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit ht
This bug has been open since mid-December
https://github.com/golang/protobuf/issues/270
Maybe people who had it checked out before still have code there in their
gopath, but for me, I get
go get -u github.com/golang/protobuf/...
package google.golang.org/genproto/protobuf: no buildable Go sourc
On Thu, Feb 9, 2017 at 1:26 AM, wrote:
> The feature I want most in go is automatic reference counting. I don't
> really care how mainline GC works but I want the language to be open to the
> possibility of ARC-GC. In order for that to be able to handle cycles you
> need a weak_ptr type that can
What is your use case?
The advantage of a GC over something like ARC is that you avoid having to
worry about cycles in the heap. Recent GC work has reduced the traditional
weakness of Tracing GCs--pauses--into a minimum (reports is 10
microseconds), so the need might not be there.
There is a pape
On Thu, Feb 9, 2017 at 5:19 AM, Sina Siadat wrote:
> Thank you!
>
> To make sure I understand what is going on I tried to reproduce the same
> thing. But I can't get the compiler to find the definition of my function
> even though I used the compiler directive here
>
> https://github.com/siadat/go
+1
Am Montag, 6. Februar 2017 17:48:17 UTC+1 schrieb sven.g...@gmail.com:
>
> Hi,
>
> I've a legacy application at hand that has a nginx as TLS offloader in
> front of it. Besides a simple frontend the application offers an API
> including a PKI infrastructure (CSRs are pushed to server, sign
The feature I want most in go is automatic reference counting. I don't
really care how mainline GC works but I want the language to be open to the
possibility of ARC-GC. In order for that to be able to handle cycles you
need a weak_ptr type that can requires explicit graduation to a shared_ptr.
Hello Gophers!
There's a fair amount of documentation available[0] about how "go install"
works, particularly in contrast to "go build,"[1,2] but not a lot about
which one is more idiomatic/preferred. Using the standard toolchain, it
seems there's three ways to build your applications:
- go buil
On Thursday, 9 February 2017 14:50:02 UTC+2, fsn7...@gmail.com wrote:
>
>
>
Of course, there are game-engines for Go:
* http://azul3d.org/
* https://github.com/EngoEngine/engo
* https://hajimehoshi.github.io/ebiten/
* https://gitlab.com/xojoc/engine/
But coul
Thank you!
To make sure I understand what is going on I tried to reproduce the same
thing. But I can't get the compiler to find the definition of my function
even though I used the compiler directive here
https://github.com/siadat/golinkname-test/blob/master/hello/hello.go#L6
I want to link th
>
>
>>> Of course, there are game-engines for Go:
>>> * http://azul3d.org/
>>> * https://github.com/EngoEngine/engo
>>> * https://hajimehoshi.github.io/ebiten/
>>> * https://gitlab.com/xojoc/engine/
>>>
>>> But could I use there engines for Android ?
--
You received this message because yo
On Thursday, February 9, 2017 at 1:15:00 PM UTC+1, Sina Siadat wrote:
>
> But can't find how the compiler connects the two.
>
It's using the //go:linkname compiler directive:
https://github.com/golang/go/blob/master/src/runtime/panic.go#L583
https://golang.org/cmd/compile/
Cheers,
Christian
It's documented. From lang spec
https://golang.org/ref/spec#Function_declarations
"A function declaration may omit the body. Such a declaration
provides the signature for a function implemented outside Go,
such as an assembly routine."
On Thu, 9 Feb 2017 04:15:00 -0800
(PS
Hi! In $GOROOT/src/sync/mutex.go:19 there is a function declaration like
this:
func throw(string) // provided by runtime
The function body is missing. I was wondering what is meant by "provided by
runtime" and how it is done.
I am guessing this is the same as the throw func defined in
src/
Synchronization with simplenote service https://simplenote.com/ may be
very appreciated. simplenote service has huge user base(me too) due to
perfect clients for android and OSX and easy sync via
simperium API https://simperium.com/. But linux client been made with
React app packaged in Electron is
Bug if i set write deadline, that means i hold two timers. it`s stranged
在 2017年2月9日星期四 UTC+8下午5:52:32,Jakob Borg写道:
>
> Yeah, for Close() on TLS connections you want to set a write deadline
> before calling Close().
>
> //jb
>
> > On 9 Feb 2017, at 10:28, liudi...@gmail.com wrote:
> >
> > O
Yeah, for Close() on TLS connections you want to set a write deadline before
calling Close().
//jb
> On 9 Feb 2017, at 10:28, liuding...@gmail.com wrote:
>
> OH sorry. it seems has some wrong in my demo code. it should import
> "crypto/tls". So Close() is in crypto/tls/conn.go.
> And i found i
OH sorry. it seems has some wrong in my demo code. it should import
"crypto/tls". So Close() is in crypto/tls/conn.go.
And i found it blocked in "c.handshakeMutex.Lock()". I suspect that
someone goroutine blocked in "c.sendAlert(alertCloseNotify)", case it`s an
network IO, and i didn`t setDeadL
40 matches
Mail list logo