Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-30 Thread vaastav anand
The stack trace only lists goroutines that are not dead/not system goroutines/not the goroutine that is calling the traceback function. (src/runtime/traceback.go) Additionally, I don't think go reclaims any memory from dead goroutines. allgs struct in src/runtime/proc.go file in the go source co

[go-nuts] Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
Hi! May be i miss something, how can i get ca cert fingerprint in go via builtin packages if i have client cert issued via this ca? -- 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,

[go-nuts] Re: the Dominance of English in Programming Languages

2019-04-30 Thread ffm2002
"They" were also developing languages of their own, also in countries not of English language, such as Pascal, Modula, Scala (Switzerland), Kotlin (Russia) and using English words as key words. It is understood by everyone in the world who already knows some other language ;-). Am Montag, 29. A

[go-nuts] Re: [golang-dev] Try our new module mirror!

2019-04-30 Thread Jakub Cajka
- Original Message - > From: "Katie Hockman" > To: golang-...@googlegroups.com > Sent: Monday, April 29, 2019 10:35:38 PM > Subject: [golang-dev] Try our new module mirror! > > Hey Gophers! > > In the blog post Go Modules in 2019 , > we announced

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-30 Thread vaastav anand
I was wrong about the gc not getting memory back from the goroutines. I think it does get that through the gcResetMarkState function. So I don't think the # of goroutines are the issue..I'm sorry if I misled you On Tuesday, 30 April 2019 00:28:29 UTC-7, vaastav anand wrote: > > The stack

[go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
Also if i use own root ca to issue intermediate cert that used for issue client certs. How can i check that intermediate ca is issued by root ca? вт, 30 апр. 2019 г., 10:48 Vasiliy Tolstov : > Hi! May be i miss something, how can i get ca cert fingerprint in go via > builtin packages if i have cl

Re: [go-nuts] binary.Read cgo fields

2019-04-30 Thread Immueggpain S
I guess I have no other choice then? BTW binary.Read shoud handle padding automatically. On Mon, Apr 22, 2019 at 10:53 AM Ian Lance Taylor wrote: > On Sat, Apr 20, 2019 at 11:53 AM wrote: > > > > binary.Read can't set unexported fields, right? > > But my structs are defined in C, and I can't ma

[go-nuts] Need help to launch hello.go

2019-04-30 Thread Robert Solomon
I use win 10. I have my code as subdirectories in src. I see that you don't. Hello/ is not in src/. And I then run go install from within src/ I also do this on ubuntu. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from th

[go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread bucarr
If I'm understanding your question correctly, this Youtube video from the 2018 Gophercon should help: https://www.youtube.com/watch?v=kxKLYDLzuHA On Tuesday, April 30, 2019 at 4:01:24 AM UTC-6, Vasiliy Tolstov wrote: > > Also if i use own root ca to issue intermediate cert that used for issue >

[go-nuts] Discrepancy between htop and memstats

2019-04-30 Thread Michel Levieux
Hi all, I'm currently having a lot of trouble debugging the memory usage of the program I'm working on. This program, everyday at a given time, reloads a bunch of data (that's been updated by another program) into its memory. The following function: // PrintMemUsage outputs the current, total and

[go-nuts] Re: [golang-dev] Try our new module mirror!

2019-04-30 Thread Russ Cox
On Tue, Apr 30, 2019 at 5:07 AM Jakub Cajka wrote: > > Our privacy policy explains how we collect and use your information. The > > privacy policy for all of these services is proxy.golang.org/privacy. > > if I'm not mistaken the page that you are linking for privacy information > of the proxy se

[go-nuts] Re: the Dominance of English in Programming Languages

2019-04-30 Thread HaWe
As others mentioned already, the 25 keywords in Go, which were taken from the english language are not a problem for (adult) programmers. And if they were, some kind of localized precompiler could handle them easily. More of a stumbling block for non-english-native readers are names and comment

[go-nuts] Map inside a struct

2019-04-30 Thread mdmajid . jahangir
I have a map inside a struct like following - type DP struct { PI string cat map[string]PS } Here, PS is another struct having two string fields. There is method where I create DP struct, initialise the map and put a key-value pair to it. I append this DP struct to an array and return fr

Re: [go-nuts] Map inside a struct

2019-04-30 Thread Jan Mercl
On Tue, Apr 30, 2019 at 4:31 PM wrote: > In the method, I can debug and see that the struct got created with map and > its key value pair, however when the method returns to the caller, the struct > is there PI and cat initialised, but the key value pairs disappear from the > map. Is this beha

Re: [go-nuts] Re: Need help to launch hello.go

2019-04-30 Thread andrey mirtchovski
> PS F:\GoWorckspace\src\hello> go install > open E:\temp\go-build447177998\b001\exe\a.out.exe: The system cannot find the > file specified. is this a school or work computer? if yes then a group policy may have disabled the execution of exe files. supply the "-work" argument to go build. it will

[go-nuts] Re: Need help to launch hello.go

2019-04-30 Thread Avetis Sargsian
GOPATH = F:\GoWorckspace GOPATH dir structure is: -bin/ -pkg/ -src/ -hello/ hello.go This is my home computer and cause is not an antivirus programm, I tried to reapit everising with it uninstalled. And here is resul running build command with -work argument PS F:\GoWorckspace\s

Re: [go-nuts] Re: Need help to launch hello.go

2019-04-30 Thread andrey mirtchovski
> PS F:\GoWorckspace\src\hello> go build -work > WORK=E:\temp\go-build828919622 > open E:\temp\go-build828919622\b001\exe\a.out.exe: The system cannot find the > file specified. once you have done this you should be able to cd to E:\temp\go-build828919622 and look around to see if any files have

Re: [go-nuts] Pass value from C code to GO code(CGO)

2019-04-30 Thread ksbhaskar
Nitish privately e-mailed me: Can you please specify the particular files in YottaDB repository that are exchanging key-value pairs between C and Go ? I am replying to the threadd. Look at the buffer_t* and key_t* files. You can also trace the implementations of NodeNextE(), SubNextE(), NodeNe

[go-nuts] Error gremlins

2019-04-30 Thread jminter
Hi, I'm pretty sure little or none of this is particularly new but I haven't had much luck finding the canonical references. I guess it's the age-old conversation about mechanical error checking vs backwards compatibility. Here are three ugly corner cases which I've bumped into recently: 1-

[go-nuts] Convert *C.char to array of strings in Go

2019-04-30 Thread Nitish Saboo
Hi, I want to convert *C.char to array of strings in Go. I want to do this because I want the first word from the string.Strings are getting appended to *C.char and I want the first word of the string. I am doing it using 'strings.Split(C.GoString(*C.char))[0]', but it is giving error. Can someo

Re: [go-nuts] Convert *C.char to array of strings in Go

2019-04-30 Thread Nitish Saboo
Apologies.I did this 'strings.Split(C.GoString(*C.char),""). I am getting 'Incompatible types' compilation error. Thanks On Wed, May 1, 2019 at 12:30 AM Nitish Saboo wrote: > Hi, > > I want to convert *C.char to array of strings in Go. > I want to do this because I want the first word from the

Re: [go-nuts] Re: Need help to launch hello.go

2019-04-30 Thread Avetis Sargsian
Ok there is one file in E:\temp\go-build828919622\b001\importcfg.link end is empty in E:\temp\go-build828919622\b001\exe this is content of importcfg.link packagefile hello=C:\Users\Avetis\AppData\Local\go-build\ae\aecfeab49f117df031d74e0ca3aad783ba25f0524b981cbb74a2db671205fadd-d packagefile fmt=

[go-nuts] Re: the Dominance of English in Programming Languages

2019-04-30 Thread jucie . andrade
Here in Brazil we usually code in Brazil's native language: Portuguese. Yes, there are some companies that mandate the use of English, albeit the additional costs of doing so, but that is very exceptional. The vast majority of brazilian software houses use Portuguese everywhere. The only Englis

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
вт, 30 апр. 2019 г. в 16:23, : > > > If I'm understanding your question correctly, this Youtube video from the > 2018 Gophercon should help: https://www.youtube.com/watch?v=kxKLYDLzuHA > Thanks, i'm already saw this. My question about ability to get trust root self signed CA cert, and trust all i

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Marcin Romaszewicz
Look at the ""crypto/x509" package, specifically at CertPool. You would load your CA public cert and intermediate cert's into a CertPool. Once you have a CertPool, you can use it in tls.Config to configure your TLS connections. Given a valid certificate chain, Go will automatically validate server

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread bucarr
Apologies. I'm quite new to Go and what you are seeking is probably over my head. On Tuesday, April 30, 2019 at 1:53:13 PM UTC-6, Vasiliy Tolstov wrote: > > вт, 30 апр. 2019 г. в 16:23, >: > > > > > > If I'm understanding your question correctly, this Youtube video from > the 2018 Gophercon

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
вт, 30 апр. 2019 г. в 23:01, Marcin Romaszewicz : > > Look at the ""crypto/x509" package, specifically at CertPool. You would load > your CA public cert and intermediate cert's into a CertPool. > > Once you have a CertPool, you can use it in tls.Config to configure your TLS > connections. Given a

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Marcin Romaszewicz
Now we're onto the topic of TLS chain of trust. The full answer is complicated. In your case, I think the answer is Yes. Say you have RootCA which signs SubCA which signs ServerCert. When your server serves on the internet, it can present just ServerCert to the clients, and if the clients know (

Re: [go-nuts] Re: Need help to launch hello.go

2019-04-30 Thread andrey mirtchovski
I'm sorry that I can't help more. It appears to me that the go builder was able to create some of the temporary files it needs, but not others. This is a very strange situation that I have not seen before. Akin to having a full disk or otherwise exhausting the storage availability. I do not know h

Re: [go-nuts] Re: Get fingerprint of ca

2019-04-30 Thread Vasiliy Tolstov
вт, 30 апр. 2019 г. в 23:30, Marcin Romaszewicz : > > Now we're onto the topic of TLS chain of trust. The full answer is > complicated. > > In your case, I think the answer is Yes. > > Say you have RootCA which signs SubCA which signs ServerCert. > > When your server serves on the internet, it can

[go-nuts] Re: There is definitely a race condition, why it can't be detected by race condition detector?

2019-04-30 Thread keith . randall
The race detector has many special cases for packages like sync and runtime, so it can detect synchronization operations. I haven't looked, but I wouldn't be surprised if the race detector ignored package sync's code bodies and just hard coded the semantics of each operation. On Monday, April 2

Re: [go-nuts] Convert *C.char to array of strings in Go

2019-04-30 Thread Justin Israel
On Wednesday, May 1, 2019 at 7:06:47 AM UTC+12, Nitish Saboo wrote: > > Apologies.I did this 'strings.Split(C.GoString(*C.char),""). > I am getting 'Incompatible types' compilation error. > Are you literally doing this? strings.Split(C.GoString(*C.char),"") Something like this should be wor

Re: [go-nuts] Convert *C.char to array of strings in Go

2019-04-30 Thread Nitish Saboo
Hi, I have this method: func CallBack(key *C.char, value *C.char, value_len C.size_t){ } and the *value* parameter in the arguments is containing the given string 'Fp5PpR2roT6uPnte47 image/gif'. I want to extract only first word from the string.Let me know how can I do this. I don't wa