Hi,
This definitely help.
Problem solved.
W dniu poniedziałek, 3 października 2016 19:40:06 UTC+2 użytkownik 刘湃
napisał:
>
> Try this https://play.golang.org/p/54Utd1Vsw3
>
> https://godoc.org/encoding/json#Marshal
>
> String values encode as JSON strings coerced to valid UTF-8, replacing
> inv
hi
in the second arg in function exec.Command(), what i must put it??
and any my question is :
i want run a cmd command.for example : cls
how can i run this method?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this grou
* hadiesmail...@gmail.com [161005 05:46]:
> hi
>
> in the second arg in function exec.Command(), what i must put it??
>
> and any my question is :
>
> i want run a cmd command.for example : cls
>
> how can i run this method?
The second argument is a variadic argument, so you can omit it; see
but i test this code it does not work!
Why??
On Wednesday, October 5, 2016 at 2:46:37 AM UTC-7, hadies...@gmail.com
wrote:
>
> hi
>
> in the second arg in function exec.Command(), what i must put it??
>
> and any my question is :
>
> i want run a cmd command.for example : cls
>
> how can i run t
In go when closure call the out varible will pass pointer to the closure
func so I doubt in example2.go y is passed &y to closure
I don't know the compile how to analysis this and decide that can be
allocated in stack correctly ?
在 2016年10月4日星期二 UTC+8下午11:54:02,Chris Manghane写道:
>
> In e
package main
import (
"bufio"
"net/http"
_ "net/http/pprof"
"os"
"time"
)
func main() {
go func() {
http.ListenAndServe(":8080", nil)
}()
reader := bufio.NewReader(os.Stdin)
for i := 0; i < 100; i++ {
go func(id int) {
for {
Nice! Seems working!
I could not get Unix Domain Socket to work, since I expected an error on
Listen or Accept but there were no errors.
On Wednesday, October 5, 2016 at 12:00:12 AM UTC+3:30, Ingo Oeser wrote:
>
> Are you looking for something like
> https://godoc.org/github.com/nightlyone/lock
On Wed, Oct 5, 2016 at 7:09 AM, 刘桂祥 wrote:
>
> want to ask when the runtime decide to threadcreate : long time not return
> syscall ? any others ??
The runtime creates a new thread whenever there is a goroutine ready
to run and the number of currently running goroutines is less than
GOMAXPROCS.
Got some insight about this from Rog Peppe. The problem seems to step from
the fact that the String() method on http.Cookie does different things
based on what values are set in the cookie. If it's just Name and Value,
then String() returns a value suitable for a Cookie header (i.e. what you'd
Sorry, poor explanation again.
When a variable is used from outside a closure's scope, it is *captured* by
the closure. Usually that means that the closure function is modified to
include a reference to that variable when it is called as a regular
function. An example from the compiler:
https://gi
That is... awesome...
On Monday, October 3, 2016 at 5:00:34 PM UTC-4, Nate Finch wrote:
>
> get it via the canonical import path:
>
> go get npf.io/gorram
>
>
> Code is at https://github.com/natefinch/gorram
>
>
> Still a work in progress, but fun to play around with right now.
>
> Lets you do thi
You didn't say how it doesn't work. You need to ask good questions to get
good answers.
On Wed, Oct 5, 2016 at 6:16 AM, wrote:
> but i test this code it does not work!
>
> Why??
>
>
> On Wednesday, October 5, 2016 at 2:46:37 AM UTC-7, hadies...@gmail.com
> wrote:
>>
>> hi
>>
>> in the second ar
Glad you think so :) Suggestions and bugs welcome. It's under active
development, and I know some things don't work right now (like variadic
functions), but I'd like to make it work with as wide a swath of go
functions as I can :) And I think that, since there's such a strong
culture of bein
RapidMQ is a pure, extremely productive, lightweight and relaible library
for managing of the local messages queue
Full information about library you can find here:
https://github.com/sybrexsys/RapidMQ
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" g
1: In example2_modified.go (y=x line should be *y=x ?) and that is the
same as example1.go ???
but in example1.go y is escapted and example2.go is not.
2:how do I see the compile handle closure call results ? compile para ?
在 2016年10月5日星期三 UTC+8下午11:38:42,Chris Manghane写道:
>
> Sorry, poor
To see the escape analysis results, compile with -gcflags "-m -m -m -m".
The code in each of the example should be relatively similar, which is why
it is a bug that one of them causes the variable to escape to the heap.
On Wed, Oct 5, 2016 at 4:46 PM, 刘桂祥 wrote:
> 1: In example2_modified.go (y
ok very thanks!
在 2016年10月6日星期四 UTC+8上午7:49:03,Chris Manghane写道:
>
> To see the escape analysis results, compile with -gcflags "-m -m -m -m".
> The code in each of the example should be relatively similar, which is why
> it is a bug that one of them causes the variable to escape to the heap.
>
none of those links work for me?
On Tuesday, 4 October 2016 13:26:58 UTC+1, rene.z...@gmail.com wrote:
>
> Hi
>
> I use the following packages in a test file:
>
> import (
> "testing"
>
> "github.com/coreos/etcd/clientv3"
> "github.com/coreos/etcd/integration"
> "github.com/coreos/pkg/capnslog"
>
They're not URLs. They're Go import paths.
To make them into links, prefix them with https://godoc.org/ like
https://godoc.org/github.com/coreos/etcd/clientv3
On Wed, Oct 5, 2016 at 5:48 PM, 'simon place' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> none of those links work for me?
>
On Thu, Oct 6, 2016 at 3:15 AM dc0d wrote:
> Nice! Seems working!
>
> I could not get Unix Domain Socket to work, since I expected an error on
> Listen or Accept but there were no errors.
>
Works fine when I tested it using this approach:
https://play.golang.org/p/A1C5BEIP2G
func main() {
Stick an @ at the start of the file name, or the socket will remain on disk
after the process has exited.
--
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
On Thu, Oct 6, 2016 at 2:13 PM Dave Cheney wrote:
> Stick an @ at the start of the file name, or the socket will remain on
> disk after the process has exited
>
That's even better, and doesn't need to use the Remove().
I didn't see it documented about using @ for abstract socket. Did I miss
that
package main
import (
"fmt"
_ "net/http/pprof"
"testing"
)
// 8 Bytes/op 1 allocs/op
func BenchmarkFmt1(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
fmt.Println(100)
}
}
// 16 Bytes/op 1 allocs/op
func BenchmarkFmt2(b *testing.B) {
b.Re
It's a Linux thing, Google abstract domain socket.
--
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, vi
24 matches
Mail list logo