[go-nuts] Re: json decode is very slow

2020-05-01 Thread Amnon Baron Cohen
That was my fault too. encoding/json is slow, but not that slow. Unfortunately the title of this thread is a bit misleading. Apparently what is taking time here is reading the data off the wire, rather than decoding the data once it has arrived. So it seems that that the slowness is probably not

[go-nuts] Re: recommended approach for loading private keys requiring passwords

2020-05-01 Thread Jason E. Aten
So as not to omit the obvious... you could overwrite the password with "***" when you are done loading the key. -- 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 ema

[go-nuts] Re: About text-based user interface for Windows and Linux

2020-05-01 Thread Jason E. Aten
All the terminal emulators I've seen on Windows are garbage. I've only tried the free ones though. You could go through a list like this https://www.slant.co/topics/1552/~best-terminal-emulators-for-windows systematically and try them all. Who knows, maybe one of the paid-for ones will work.

[go-nuts] Re: json decode is very slow

2020-05-01 Thread Jason E. Aten
you could try ffjson https://github.com/pquerna/ffjson On Tuesday, April 28, 2020 at 12:49:08 PM UTC-4, Sarath Prabath Redlapalli Jaya wrote: > > req := &mystruct{} > json.NewDecoder(r.Body).Decode(req) > > > We've instrument the above code block and reading request body bytes is > taking very l

Re: [go-nuts] Re: marshal multiple json documents which may have different format versions into the latest struct version

2020-05-01 Thread Tom Payne
Possibly also useful if you're dealing with JSON documents with different structures: https://github.com/twpayne/go-jsonstruct This will generate the most specific Go struct possible that covers all the example documents that you give it. In your example it will generate: package main type T

[go-nuts] Re: Is there a library for validating gmail's Variants

2020-05-01 Thread Andrey Tcherepanov
I don't think it is a good idea to even try to figure it out. There are domains that using GSuite, or redirect to gmail as their mail service. They will use the same rules, but different host name. On Thursday, April 30, 2020 at 11:05:43 AM UTC-6, Walter Peng wrote: > > Hello community, > > We

Re: [go-nuts] Re: FIPS Crypto Algorithm Certification

2020-05-01 Thread Ian Lance Taylor
On Fri, May 1, 2020 at 2:50 PM albert.leung%centrify.com via golang-nuts wrote: > > This reply was 6 years ago. Just curious if the golang team changes the > position on this or not? See https://go.googlesource.com/go/+/dev.boringcrypto/README.boringcrypto.md . Ian > On Wednesday, April 9,

[go-nuts] Re: FIPS Crypto Algorithm Certification

2020-05-01 Thread albert.leung%centrify.com via golang-nuts
This reply was 6 years ago. Just curious if the golang team changes the position on this or not? Thanks Albert On Wednesday, April 9, 2014 at 1:43:52 PM UTC-7, agl wrote: > > On Monday, April 7, 2014 6:53:56 AM UTC-7, John Waycott wrote: >> >> I am wondering if there's been any discussion among

Re: [go-nuts] Re: net.ParseIP unable to parse some types of ipv6 addresses

2020-05-01 Thread andrey mirtchovski
thanks. that ought to do it. On Fri, May 1, 2020 at 11:16 AM Brian Candler wrote: > > parseIP returns a net.IP which is just a slice of bytes without the zone. > > However, type net.IPAddr includes the zone. Looks like net.ResolveIPAddr > will do the job: > > https://play.golang.org/p/7p1XXIrVG

[go-nuts] Re: net.ParseIP unable to parse some types of ipv6 addresses

2020-05-01 Thread Brian Candler
parseIP returns a net.IP which is just a slice of bytes without the zone. However, type net.IPAddr includes the zone. Looks like net.ResolveIPAddr will do the job: https://play.golang.org/p/7p1XXIrVGI0 -- You received this message because you are subscribe

[go-nuts] net.ParseIP unable to parse some types of ipv6 addresses

2020-05-01 Thread andrey mirtchovski
IPv6 addresses including a zone identifier [rfc4007] are not parsed correctly by net.ParseIP. is there any point in creating an issue or is this intentional and we're supposed to strip the zone identifier? https://play.golang.org/p/kQKyYYnZydX -- You received this message because you are subscri

Re: [go-nuts] Build fails when following build instructions

2020-05-01 Thread 'Than McIntosh' via golang-nuts
Sorry, I wasn't clear on that last email. What I'm asking is if you could rerun the compilation by hand, e.g. $ cat > /tmp/CheckSymbolExists.c << EOF #include int main(int argc, char** argv) { (void)argv; #ifndef mmap return ((int*)(&mmap))[argc]; #else (void)argc; return 0; #endif } EO

Re: [go-nuts] Build fails when following build instructions

2020-05-01 Thread 'Than McIntosh' via golang-nuts
A little more detail on the error in question. This is a very obscure error, so please bear with me. >>/usr/bin/ld.gold: error: CMakeFiles/cmTC_81c99.dir/CheckSymbolExists.c.o: failed to match split-stack sequence at section 4 offset 0 What's happening here is that the linker (ld.gold) is linking

[go-nuts] Re: URL parsing with special characters.

2020-05-01 Thread Vivek
Thanks everyone. I am using "github.com/jlaffaye/ftp" library which returned unescaped file names when doing directory listing. I constructed the full url by doing filePath = "ftp://user:pass@192.168.0.1/path/"; + "file%ver3.txt