go1.7.1
go run -gcflags '-N -l -m' example.go
在 2017年4月14日星期五 UTC+8下午1:18:26,Ian Lance Taylor写道:
>
> On Thu, Apr 13, 2017 at 8:33 PM, 刘桂祥
> wrote:
> > // example.go
> > package main
> >
> >
> > import "runtime"
> >
> >
> > type S struct{}
> >
> >
> > func
Hi,
I'm writing and application where I need to check for some condition and do
something every 'x' < 'y' seconds. If the condition is not true after 'y'
seconds I do something. Every time the condition checked every 'x' seconds
is true I have to reset the 'y' timeout.
I wrote a test
// example.go
package main
import "runtime"
type S struct{}
func main() {
var stats runtime.MemStats
runtime.ReadMemStats()
println(stats.Mallocs)
var x S
runtime.ReadMemStats()
println(stats.Mallocs)
_ = *ref(x)
runtime.ReadMemStats()
println(stats.Mallocs)
}
func ref(z S) *S {
Hi. I'm new to Go. I wrote some code for my own use on Ubuntu 16.04
amd64, using just vim as my editor.
Then I got experimental and installed vscode
(code_1.11.1-whatever-amd64.deb) and I let it install all the Go stuff
it wanted.
I'm getting "cannot find package" messages from I guess
>
>
>
> CXXFLAGS
>
> See https://golang.org/cmd/cgo .
>
> Ian
>
Cool - that works now like a charm - so much simpler than before - no more
100 line long complicated make file.
Thanks a lot for your help!!!
--
You received this message because you are subscribed to the Google Groups
On Thu, Apr 13, 2017 at 11:40 AM, larry104 wrote:
>>
>>
>> The go tool will run whichever one is first on your PATH.
>>
>> Ian
>
>
> My mistake - there was a typo - Tracing what go build does with the -x
> option shows that swig run correct now (interface file with
As Russ Cox, a somewhat famous Gopher, noted, that's an NP-complete
problem. You can pay in effort (several different interpretations of
"flattening"), in compile speed(running a SAT solver) or you can fail (;-))
This won't help you, but the last three times we ran into this, we changed
the
Doesn't flattening and using a service like gopkg.in solve this issue? Then
you can have both flat structure and multiple versions of the same library
since different versions of the same library appear as different packages
since the import path is different.
On Thursday, April 13, 2017 at
In short: You can't.
Flattening is the way to go (pun intended) but dependeing on different
versions will brake your build.
On Thu, Apr 13, 2017 at 9:48 PM johnbernardo via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> Our team has run into some complicated issues regarding vendoring.
Our team has run into some complicated issues regarding vendoring. The
simplest way to explain it is with an illustration.
We have three separate repositories; Main, Foo and Bar.
Main vendors Bar
Main vendors Foo
Foo vendors Bar
When trying to build this code, compile errors like this arise:
Hi Alexandre
I tried sending an email using the server settings from my outlook mailbox
and got this error - Could you shed some light as to what this could be
about?
panic: read tcp 10.18.32.66:59347->10.12.137.20:3268: read: connection
reset by peer
goroutine 1 [running]:
panic(0x1aaf80,
>
>
>
> The go tool will run whichever one is first on your PATH.
>
> Ian
>
My mistake - there was a typo - Tracing what go build does with the -x
option shows that swig run correct now (interface file with .swigcxx
extension). Then it seems cg0 compiles all files in the _obj file with gcc4
I think the most extreme variant of this sharing is when you build up a
"binary tree" that keeps pointing both left and right pointers to the same
underlying structure. A tree of size K is supposed to have around 2^K nodes
but in reality the memory layout is around K nodes in size. Suppose we
My program works on files, read from input and write to output.
Is there any ready-made and *light *testing packages that allows me
checking whether the new output is the same as before?
Thanks
--
You received this message because you are subscribed to the Google Groups
"golang-nuts"
On Thu, Apr 13, 2017 at 9:31 AM, wrote:
> https://play.golang.org/p/swRxxCbb65
>
> Surely s1 uses more than 8 bytes.
Unfortunately, your question is not well defined. s1 itself is 8
bytes. If you write `s3 := s1` and ask for the size of s3, it too
will be 8
On Thu, Apr 13, 2017 at 9:31 AM, wrote:
> https://play.golang.org/p/swRxxCbb65
>
> Surely s1 uses more than 8 bytes.
Unfortunately, your question is not well defined. s1 itself is 8
bytes. If you write `s3 := s1` and ask for the size of s3, it too
will be 8
On Thu, Apr 13, 2017 at 6:31 PM wrote:
> https://play.golang.org/p/swRxxCbb65
>
> Surely s1 uses more than 8 bytes.
no
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group
https://play.golang.org/p/swRxxCbb65
Surely s1 uses more than 8 bytes.
On Thursday, April 13, 2017 at 11:28:39 AM UTC-5, Jan Mercl wrote:
>
> On Thu, Apr 13, 2017 at 6:24 PM AWildTyphlosion <
> sdi...@watchtower-security.com > wrote:
>
> > I'm trying to figure out how much memory a value. Anyone
On Thu, Apr 13, 2017 at 6:24 PM AWildTyphlosion <
sdic...@watchtower-security.com> wrote:
> I'm trying to figure out how much memory a value. Anyone have a clue how
to?
unsafe.Sizeof/reflect.Type.Size
--
-j
--
You received this message because you are subscribed to the Google Groups
I'm trying to figure out how much memory a value. Anyone have a clue how to?
--
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
On Thu, 13 Apr 2017 05:35:57 -0700 (PDT)
Joe Blue wrote:
> I have to consume 100's of restful services :)
>
> So the only way is going to be some sort of parse and codegen
> approach.
>
> Can anyone suggest any libraries or approaches please ?
go-swagger may be?
It's
Hey!
I have just finished translating the Tour of Go to Russian language. I
deployed it to https://go-tour-ru-ru.appspot.com - "go-tour-ru" was not
available and there was nothing at this URL.
I hope it will be useful.
--
You received this message because you are subscribed to the Google
I have to consume 100's of restful services :)
So the only way is going to be some sort of parse and codegen approach.
Can anyone suggest any libraries or approaches please ?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from
I should clarify one thing: there are two open issues regarding the
·semantics· of the files: how the default versions are parsed re: the
caret[0], and how OS/arch/build tags are parameterized[1]. Until these
issues are closed, dep may change its interpretation of the files. If
you're interested
Maybe something like this:
https://github.com/chrislusf/gleam/blob/master/README.md
It's generic and powerful.
--
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
I am writing a grpc code generator.
It generates the normal stuff plus all database crud.
The DBs are only kv ones. Like boltdb and goleveldb. Also Mino fs can be used
as a kv store.
You model you functions in grpc with a get and set name at the start. This
allows me to see what is a read and
Because in Go general purpose registers are caller save.
--
Aram Hăvărneanu
--
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
In runtime.gogo function, it's only restore SP LR PC, I couldn't understand
how it works.
Assume that last goroutinue used R0-R9, and then the next goroutinue
scheduled in, without restore R0-R9;
and then why dose the next goroutinue can work without errors?
--
You received this message
And an update: thanks to the excellent work of contributor Carolyn Van
Slyck, we have the manifest and lock file format changes complete and
merged[0] to dep. From this point forward the file formats should be
stable enough to start committing. So, as Russ originally noted:
please do give it a
29 matches
Mail list logo