Thanks, Marvin, I've learned a lot from your reply. And, I've written more
code, like:
a, b, c := 1, 2, 3
> slice1 := []int{a, b, c}
> for _, n := range slice1 {
> go func(n *int) {fmt.Println(*n)}(&n)
> }
It seems that pass *n's address *in the code above will make a data race,
which you have
ok I have a problem with rounding errors on floats which I think is
unavoidable. Just as specific background this is happening for me on tests
of vectors (lines) intersecting with bounding boxes (ie oblongs, axis
aligned). Two code snippets shows the core of the maths..
front_n = (x_front - s.X
Why use that when ecdh is apparently more secure? https://weakdh.org/
On Wed, Sep 7, 2016 at 11:45 PM FY wrote:
> Hello,
>
> Am I missing something ?
>
> I am trying to use the exchange algorithm called
> "diffie-hellman-group-exchange-sha1" It looks like Go does not support it
>
>
> From this l
Yes. The bottom.
--
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://groups.google.com/d/op
* Dave Cheney [160917 15:58]:
> Move http.ListenAndServe to the top of the main() function, outside the
> http.HandleFunc call and it will work.
Don't you mean bottom? At the top, the ListenAndServe will not return,
so the HandleFunc call will never be made, so you will always get 404.
...Marv
Use the Type:
reflect.Value.Type.String: https://play.golang.org/p/dlwjCROG6H
On Saturday, September 17, 2016 at 3:53:35 AM UTC-7, mhhcbon wrote:
>
> Hi,
>
> i m wondering if one can use reflect to extract at runtime the body and
> and signature of a Func or 'Public method' ?
> Will a reflect.Va
Move http.ListenAndServe to the top of the main() function, outside the
http.HandleFunc call and it will work.
On Sunday, 18 September 2016 05:50:03 UTC+10, loc...@gmail.com wrote:
>
> Hello everyone,
>
> I am using Go version 1.7.1 on a 32-bit version of Windows 10 and cannot
> view the content
The ListenAndServe shouldn't be in the handler function.
When you run this app, does it exit immediately? Because it looks like it
exits immediately. Not serving anything.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
Hi all,
My apologies; I very well understand that the answers to my question here
could be subjective / opinions yet I would like to know if I could really
continue banking on this Websockets.
I feel Websockets is really cool and I have used it for IPC between non-web
applications. Certainly
I know this topic is a bit old, but I needed it recently on Windows and
I'll post here how I did it in case someone else needs.
I used Windows mutex as described by ankurg...@gmail.com:
var (
kernel32= syscall.NewLazyDLL("kernel32.dll")
procCreateMutex = kernel32.NewProc("CreateM
Hello everyone,
I am using Go version 1.7.1 on a 32-bit version of Windows 10 and cannot
view the contents of the address localhost:1234.
I created a server at the aforementioned address or at least, I think I did
and get nothing but an error message when I try to open my browser.
Here's my co
My Go application has both standard http (on port 80) and SSL (on port 443)
enabled.
I continuously get these 3 kinds of error:
*http2: server: error reading preface from client 79.49.31.60:37993:
timeout waiting for client preface*
*http: TLS handshake error from 151.38.29.250:44235: EOF*
*
* Fei Ding [160916 23:30]:
> Link here: https://play.golang.org/p/cdryPmyWt5
>
> The code above is going to check the differences between pointers and
> values in a for loop, while go statement is also used at the same time. For
> code:
>
> values := []field{{"one"},{"two"},{"three"}}
>
dc0d,
It's implementation dependendent. Be explicit. For example, pass a flag
argument,
*//go:generate go run main.go -gogenerate*
Peter
On Saturday, September 17, 2016 at 9:28:16 AM UTC-4, dc0d wrote:
>
> How to find out if the *main* function is started by executing the
> compiled binary or
How to find out if the *main* function is started by executing the compiled
binary or by *go run*?
By examining *os.Args* it can be seen at the first case (running the app)
we will have the *binary name* as the first argument without any path and
when it is started using go run, we will have so
Actually, the issue is not the template but my logger. The logger is
writing to os.Stderr for some reason that's not preserving new lines but if
i do fmt.Println then the new lines are preserved. Pretty sure i've made a
simple error here and need to investigate more.
Joe
On Saturday, Septem
Hi all,
Say I have the following struct:
type Info struct {
Summary string
Descstring
}
And this is the template string
tmplStr = `Summary={{.Summary}}, Desc={{.Desc}}`
If the value of Desc has newlines, it looks like the template engine strips
those out and replaces th
Thanks Dave - all good suggestions!
> Use a GCE Network LB instead of HTTP LB.
I'm hoping to avoid using a network LB since we are operating over https so
that means we'll have to terminate SSL ourselves (which means distributing
our certs to each backend instance). Using an http(s) LB means we
A slice shares enough properties with string to make + intuitive.
[a, b, y, z] = [a, b] + [y, z] // make() and copy()
To me the ++ operator (and +=) operator for slices are intuitive too.
[a, b, c, d] = [a, b] ++ [c, d] // append(slice, slice...)
An operator and composite literal combined wou
On Friday, September 16, 2016 at 11:11:17 AM UTC-6, oyi...@gmail.com wrote:
>
> I have not been able to find an explanation. Does anyone care to explain
> or point to relevant documentation?
>
One data point: I'd expect slice + slice to create a new object, that is, a
new backing array. I'd al
Because print() is called on different pointer values.
--
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,
Hi,
i m wondering if one can use reflect to extract at runtime the body and and
signature of a Func or 'Public method' ?
Will a reflect.Value.String of a Method give me that data ?
https://golang.org/pkg/reflect/#Method
Will that work on a compiled binary ? (An environment where the raw source
The more contextual a PL's semantics is the harder it is to make sense of a
program written in that PL (the inverse is also true, that's why we don't
program lining zeros and ones ) ... The problem with what you are asking is
why yet another special case for slices ? why not one for channels ? w
24 matches
Mail list logo