[go-nuts] Re: What would be a non-regexp alternative?

2020-05-04 Thread Vivi
I like to replace one or more characters to one character e.g. to sanitize 
proper slug title with a dash.

On Monday, 4 May 2020 14:24:26 UTC+8, Tamás Gulácsi wrote:
>
> You just want to remove those characters? Use strings.Map.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8b9a6340-7d47-44bf-b3e5-09bec4239384%40googlegroups.com.


[go-nuts] Re: What would be a non-regexp alternative?

2020-05-04 Thread Tamás Gulácsi
2020. május 4., hétfő 11:26:26 UTC+2 időpontban Vivi a következőt írta:
>
> I like to replace one or more characters to one character e.g. to sanitize 
> proper slug title with a dash.
>
> On Monday, 4 May 2020 14:24:26 UTC+8, Tamás Gulácsi wrote:
>>
>> You just want to remove those characters? Use strings.Map.
>
>
See https://play.golang.org/p/dI6ZFG_mzLV for example. 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/87d7c59f-3e13-465f-9644-61a4b5ee1c0d%40googlegroups.com.


[go-nuts] Re: What would be a non-regexp alternative?

2020-05-04 Thread Vivi
Interesting, I didn't know strings.Map could work this way, I have done a 
performance benchmark with PHP 7 Pcre2 C is 1,020 nanoseconds and 
strings.Map version is 2,888 nanoseconds, not bad improvement over regexp. 
If there is a better approach, however, Rust Re2 is just as fast as PHP 
Pcre2.

On Monday, 4 May 2020 17:50:15 UTC+8, Tamás Gulácsi wrote:
>
> 2020. május 4., hétfő 11:26:26 UTC+2 időpontban Vivi a következőt írta:
>>
>> I like to replace one or more characters to one character e.g. to 
>> sanitize proper slug title with a dash.
>>
>> On Monday, 4 May 2020 14:24:26 UTC+8, Tamás Gulácsi wrote:
>>>
>>> You just want to remove those characters? Use strings.Map.
>>
>>
> See https://play.golang.org/p/dI6ZFG_mzLV for example. 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/0c250bd5-aa0e-4038-bb09-184f796aba7a%40googlegroups.com.


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

2020-05-04 Thread 'Martins Eglitis' via golang-nuts

Hi,

I am getting output like this:

/tmp/CheckSymbolExists.c: In function 'main':
/tmp/CheckSymbolExists.c:7:11: warning: ISO C forbids conversion of function 
pointer to object pointer type [-Wpedantic]
7 |   return ((int*)(&mmap))[argc];
  |   ^
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-10ubuntu2' 
--with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs 
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr 
--with-gcc-major-version-only --program-suffix=-9 
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new 
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin 
--enable-default-pie --with-system-zlib --with-target-system-zlib=auto 
--enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib 
--with-tune=generic --enable-offload-targets=nvptx-none,hsa 
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-fPIC' '-fsplit-stack' '-fuse-ld=gold' '-o' 
'/tmp/a.out' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin 
/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so 
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper 
-plugin-opt=-fresolution=/tmp/ccoxuoxd.res -plugin-opt=-pass-through=-lgcc 
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc 
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id 
--eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker 
/lib64/ld-linux-x86-64.so.2 -pie -z now -fuse-ld=gold -z relro -o /tmp/a.out 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 
-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu 
-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu 
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib 
-L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -allow-shlib-undefined --debug all 
/tmp/CheckSymbolExists.o -lm --wrap=pthread_create -lgcc --push-state 
--as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s 
--pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
/usr/bin/ld.gold: recording to gold-recording-26rMUl
/usr/bin/ld.gold:   0 running   task Dir_cache_task 
/usr/lib/gcc/x86_64-linux-gnu/9
/usr/bin/ld.gold:   0 completed task Dir_cache_task 
/usr/lib/gcc/x86_64-linux-gnu/9 (user: 0.00 sys: 0.00 wall: 0.00)
/usr/bin/ld.gold:   0 running   task Dir_cache_task 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu
/usr/bin/ld.gold:   0 completed task Dir_cache_task 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu (user: 0.00 sys: 
0.00 wall: 0.00)
/usr/bin/ld.gold:   0 running   task Dir_cache_task 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib
/usr/bin/ld.gold:   0 completed task Dir_cache_task 
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib (user: 0.00 sys: 0.00 
wall: 0.00)
/usr/bin/ld.gold:   0 running   task Dir_cache_task /lib/x86_64-linux-gnu
/usr/bin/ld.gold:   0 completed task Dir_cache_task /lib/x86_64-linux-gnu 
(user: 0.00 sys: 0.00 wall: 0.01)
/usr/bin/ld.gold:   0 running   task Dir_cache_task /lib/../lib
/usr/bin/ld.gold:   0 completed task Dir_cache_task /lib/../lib (user: 0.00 
sys: 0.00 wall: 0.00)
/usr/bin/ld.gold:   0 running   task Dir_cache_task /usr/lib/x86_64-linux-gnu
/usr/bin/ld.gold:   0 completed task Dir_cache_task /usr/lib/x86_64-linux-gnu 
(user: 0.00 sys: 0.00 wall: 0.00)
/usr/bin/ld.gold:   0 running   task Dir_cache_task /usr/lib/../lib
/usr/bin/ld.gold:   0 completed task Dir_cache_task /usr/lib/../lib (user: 
0.00 sys: 0.00 wall: 0.00)
/usr/bin/ld.gold:   0 running   ta

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

2020-05-04 Thread 'Than McIntosh' via golang-nuts
Thanks!

Could you also please run

objdump -tldr /tmp/CheckSymbolExists.o

and send me the output of that?

Cheers, Than


On Mon, May 4, 2020 at 7:37 AM Martins Eglitis 
wrote:

> Hi,
>
> I am getting output like this:
>
> /tmp/CheckSymbolExists.c: In function 'main':
> /tmp/CheckSymbolExists.c:7:11: warning: ISO C forbids conversion of function 
> pointer to object pointer type [-Wpedantic]
> 7 |   return ((int*)(&mmap))[argc];
>   |   ^
> Using built-in specs.
> COLLECT_GCC=/usr/bin/cc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
> OFFLOAD_TARGET_NAMES=nvptx-none:hsa
> OFFLOAD_TARGET_DEFAULT=1
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
> 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs 
> --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr 
> --with-gcc-major-version-only --program-suffix=-9 
> --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id 
> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
> --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug 
> --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new 
> --enable-gnu-unique-object --disable-vtable-verify --enable-plugin 
> --enable-default-pie --with-system-zlib --with-target-system-zlib=auto 
> --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 
> --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib 
> --with-tune=generic --enable-offload-targets=nvptx-none,hsa 
> --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu 
> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
> COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
> LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
> COLLECT_GCC_OPTIONS='-v' '-fPIC' '-fsplit-stack' '-fuse-ld=gold' '-o' 
> '/tmp/a.out' '-mtune=generic' '-march=x86-64'
>  /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin 
> /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so 
> -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper 
> -plugin-opt=-fresolution=/tmp/ccoxuoxd.res -plugin-opt=-pass-through=-lgcc 
> -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc 
> -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id 
> --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker 
> /lib64/ld-linux-x86-64.so.2 -pie -z now -fuse-ld=gold -z relro -o /tmp/a.out 
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o 
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o 
> /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 
> -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu 
> -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu 
> -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib 
> -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -allow-shlib-undefined --debug all 
> /tmp/CheckSymbolExists.o -lm --wrap=pthread_create -lgcc --push-state 
> --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s 
> --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o 
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
> /usr/bin/ld.gold: recording to gold-recording-26rMUl
> /usr/bin/ld.gold:   0 running   task Dir_cache_task 
> /usr/lib/gcc/x86_64-linux-gnu/9
> /usr/bin/ld.gold:   0 completed task Dir_cache_task 
> /usr/lib/gcc/x86_64-linux-gnu/9 (user: 0.00 sys: 0.00 wall: 0.00)
> /usr/bin/ld.gold:   0 running   task Dir_cache_task 
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu
> /usr/bin/ld.gold:   0 completed task Dir_cache_task 
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu (user: 0.00 
> sys: 0.00 wall: 0.00)
> /usr/bin/ld.gold:   0 running   task Dir_cache_task 
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib
> /usr/bin/ld.gold:   0 completed task Dir_cache_task 
> /usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib (user: 0.00 sys: 0.00 
> wall: 0.00)
> /usr/bin/ld.gold:   0 running   task Dir_cache_task /lib/x86_64-linux-gnu
> /usr/bin/ld.gold:   0 completed task Dir_cache_task /lib/x86_64-linux-gnu 
> (user: 0.00 sys: 0.00 wall: 0.01)
> /usr/bin/ld.gold:   0 running   task Dir_cache_task /lib/../lib
> /usr/bin/ld.gold:   0 completed task Dir_cache_task /lib/../lib (user: 
> 0.00 sys: 0.00 wall: 0.00)
> /usr/bin/ld.gold:   0 running   task Dir_cache_task /usr/lib/x86_64-linux-gnu
> /usr/bin/

[go-nuts] Re: What would be a non-regexp alternative?

2020-05-04 Thread Tamás Gulácsi
2020. május 4., hétfő 12:23:05 UTC+2 időpontban Vivi a következőt írta:
>
> Interesting, I didn't know strings.Map could work this way, I have done a 
> performance benchmark with PHP 7 Pcre2 C is 1,020 nanoseconds and 
> strings.Map version is 2,888 nanoseconds, not bad improvement over regexp. 
> If there is a better approach, however, Rust Re2 is just as fast as PHP 
> Pcre2.
>
> On Monday, 4 May 2020 17:50:15 UTC+8, Tamás Gulácsi wrote:
>>
>> 2020. május 4., hétfő 11:26:26 UTC+2 időpontban Vivi a következőt írta:
>>>
>>> I like to replace one or more characters to one character e.g. to 
>>> sanitize proper slug title with a dash.
>>>
>>> On Monday, 4 May 2020 14:24:26 UTC+8, Tamás Gulácsi wrote:

 You just want to remove those characters? Use strings.Map.
>>>
>>>
>> See https://play.golang.org/p/dI6ZFG_mzLV for example. 
>>
>
bytes.Map may be faster.
But even that is just a handful of lines 
(https://github.com/golang/go/blob/go1.14.2/src/bytes/bytes.go#L453) 
so if you really want speed, just copy and tweak it.

I'm not saying that regexps are slow, but they're complex, and where 
a simple loop with a boolean placeholder satisfies, then we don't need  
that regexp.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/34e42093-7e26-4002-b7f9-1bb9dcf9817e%40googlegroups.com.


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

2020-05-04 Thread Robert Engels
Look at github.com/robaho/go-trader

It has a nice example of using gcui 

> On May 3, 2020, at 11:06 PM, 洪嘉鴻  wrote:
> 
> 
> I see.
> Actually I only want to make a simple application.
> The application is about segmenting two text-boxes for input and output.
> I've tried this and it seems good, except for the complicated example such as 
> "demo".
> (The terminal emulator on Windows really mess "demo" up.)
> However, it seems that there is not any functions to scan input with "termui".
> The answer I found from this could't solve the problem because the the type 
> "Attribute" and "TextBuilder" are undefined within "input.go".
> I've just asked the author.
> Besides, I've also tried Tcell.
> However, there is not more examples for learning.
> Did you find any examples and could you offer the link?
> 
> Thanks for your replying.
> Max
> 
> Jason E. Aten於 2020年5月4日星期一 UTC+8上午9時45分57秒寫道:
>> 
>> You didn't take my meaning. The reason the examples don't work on Windows is 
>> because the terminal emulator on Windows is messing them up.
>> 
>> https://github.com/gdamore/proxima5 is an example. Tcell is cross platform.
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/3aaf75d8-d992-4612-91c4-ae73094f8157%40googlegroups.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/F5CD53A9-7FBE-4617-9594-FC648DEA3F9B%40ix.netcom.com.


[go-nuts] Need help with go modules

2020-05-04 Thread web user
I have a personal project using GOPATH

But recently, I wanted to use go-redis for a project and v7 forces you to 
use go mod. So I figured, I'd migrate the account over to go mod. But I'm 
stuck. 


My directory structure is:

~HOME/src/myrepo
~HOME/src/myrepo/cmd/cmd1
~HOME/src/myrepo/commong
~HOME/src/github

So I did the following command: cd ~HOME/src/myrepo; go mod init 
~HOME/src/myrepo

when I run the command go build ~HOME/src/myrepo/cmd/cmd1/...

It does not update the go.mod in the directory ~HOME/src/myrepo? Do I need 
a go.mod in ~HOME/src/myrepo/cmd/cmd1


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/7a9969c8-92da-4533-b701-c9c317d26c79%40googlegroups.com.


[go-nuts] Re: Using FIPS-compliant boring Go to connect to microsoft.com(specifically)

2020-05-04 Thread pradeeprathi
We are facing similar issues with dev.broingCrypto branch when using RSA 
4096. 

See Page 195 of following link 
https://csrc.nist.gov/csrc/media/projects/cryptographic-module-validation-program/documents/fips140-2/fips1402ig.pdf

Question/Problem SP 800-131A Rev1 provides only the lower bound, 2048 bits, 
for the RSA modulus size used in signature generation. Does this imply that 
the RSA modulus sizes other than 2048 and 3072 may be used to generate the 
RSA signatures in the approved mode? In particular, is the use of the 
4096-bit modulus approved and, if so, what are the testing requirements for 
the RSA key generation if the key pair used in the RSA signature algorithm 
is generated by the module? 

Resolution 

When performing an RSA signature generation, a module may use any modulus 
size greater than or equal to 2048 bits. At least one of the RSA modulus 
lengths supported by the module for RSA signature generation shall be 2048, 
3072, or 4096 bits.

On Monday, May 4, 2020 at 8:40:37 AM UTC+5:30, Bhagya Prasad NR wrote:
>
> (Disclaimer: Not a FIPS compliance expert)
>
> Couple of observations. I looked at how others are treating this by taking 
> an example of OpenSSL 1.1.1 and Go's 1.12.4 distribution from CentOS 8.1 
> (which is derived from RHEL 8.1 and RHEL is inline for FIPS 140-2 
> validation as we speak).  
>
> [1]. OpenSSL 1.1.1 FIPS patch (source: 
> http://vault.centos.org/8.1.1911/BaseOS/Source/SPackages/openssl-1.1.1c-2.el8.src.rpm
>  
> ) allows RSA public key modulus bits greater than 1024 bits in size via 
> OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 
> (whose value is defined in rsa.h as 1048)
>
>
> [2]. CentOS 8.1 's go lang distribution (source: 
> http://vault.centos.org/8.1.1911/AppStream/Source/SPackages/golang-1.12.12-4.module_el8.1.0+271+e71148fc.src.rpm;
>  
> File: src/crypto/tls/boring.go) allows RSA public key modules bits greater 
> than 2048 and its size divisible by 512 as valid RSA public keys. 
>
>
> Attaching relevant screenshots below.  Does this tell there is a need for 
> a patch in golang's dev.boringcrypto branch to allow RSA 4096 bit keys?  
> Has anyone encountered the issue by using dev.boringcrypto distribution? 
>
> Thanks!
> Bhagya
>
> On Thursday, April 30, 2020 at 11:13:18 AM UTC-7, mohit@gmail.com 
> wrote:
>>
>> Summary - Trying Boring Go in FIPS mode to connect to Microsoft services 
>> (Azure). Intermediate CA Certificate for Microsoft has a 4096 bit public 
>> key that is not allowed by Boring Go (Code here 
>> 
>>  
>> ), Is there any workaround without having to turn off FIPS mode ?
>>
>> go version go1.14b4 linux/amd64
>>
>> Hi all,
>> So I am working on an application that requires to be run in FIPS mode 
>> and has to connect to Azure services. I looked up the boring Go branch, got 
>> version 1.14 and started using it.
>> While trying to connect to Azure services (for eg. 
>> graph[dot]microsoft[dot]com or even microsoft[dot]com), I was getting an 
>> incompatible certificate usage issue. Here is the sample code I am using -
>> `package main
>>
>> import (
>> "fmt"
>> "io/ioutil"
>> "net/http"
>> _ "crypto/tls/fipsonly" //Code works without this but we need the 
>> application to run in FIPS
>> )
>> func main() {
>> url := "https: //microsoft.com" //Space put here because of two link 
>> limit
>> fmt.Printf("HTML code of %s ...\n", url)
>> client := &http.Client{}
>> resp, err := client.Get(url)
>> 
>> if err != nil {
>> panic(err)
>> }
>>
>> defer resp.Body.Close()
>> 
>> html, err := ioutil.ReadAll(resp.Body)
>> if err != nil {
>> panic(err)
>> }
>> 
>> fmt.Printf("%s\n", html)
>> }`
>>
>> The error I get is as follows -
>> HTML code of https: //microsoft.com ... panic: Get "https: //
>> microsoft.com": x509: certificate specifies an incompatible key usage 
>> goroutine 1 [running]: main.main() /usr/local/go/bin/test.go:15 +0x26c exit 
>> status 2
>>
>> I checked the golang code and found that a certificate with a 4096 bit 
>> public key is not a valid certificate according to the IsBoringCertificate 
>> function The intermediate certificate in Microsoft’s Certificate Chain has 
>> a 4096 bit public key.
>> [image: Screen Shot 2020-04-27 at 12.35.20 PM] 
>> 
>>
>> So, my question is as follows :
>>
>>1. Is this intended behavior ?
>>2. If yes, is here any workaround via which I can keep FIPS mode on 
>>and connect to these services ? This workaround can be code changes or 
>>using different tools. However, I can’t turn off FIPS mode.
>>
>> Thanks for going through this !
>>
>

-- 
You received this message because you are subscribed to t

[go-nuts] Go crashing when run from Jenkins

2020-05-04 Thread Grant Singleton

I'm running go 1.14.2 on a windows 2019 server that is acting as a jenkins 
slave. The jenkins and the slave are connected with ssh and the master 
starts a python process on the slave and that invoked go. ```go version``` 
and ```go build``` crash. But if I ssh or rdp into the server and run 
either the python or go commands directly they work. Below are the crash 
dumps that I'm getting. Any ideas on what the stack dumps mean, and whats 
going wrong would be most appreciated.

```go version``` crash dump:
```
fatal error: runtime: mcall called on m->g0 stack

runtime stack:
io/ioutil.ReadFile(0xc0001481e0, 0x29, 0x0, 0x0, 0xcb, 0x0, 0xc00016ad00)
c:/go/src/io/ioutil/ioutil.go:52
cmd/go/internal/cfg.initEnvCache()
c:/go/src/cmd/go/internal/cfg/cfg.go:174 +0x69
sync.(*Once).doSlow(0xea9b00, 0xa76800)
c:/go/src/sync/once.go:66 +0xf3
sync.(*Once).Do(...)
c:/go/src/sync/once.go:57
cmd/go/internal/cfg.Getenv(0xa2ac05, 0x4, 0xc0001480f0, 0x2b)
c:/go/src/cmd/go/internal/cfg/cfg.go:223 +0x15e
cmd/go/internal/cfg.envOr(...)
c:/go/src/cmd/go/internal/cfg/cfg.go:280
cmd/go/internal/cfg.defaultContext(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, ...)
c:/go/src/cmd/go/internal/cfg/cfg.go:74 +0x1ad
cmd/go/internal/cfg.init()
c:/go/src/cmd/go/internal/cfg/cfg.go:28 +0x3e

goroutine 1 [runnable, locked to thread]:
io/ioutil.ReadFile(0xc0001481e0, 0x29, 0x0, 0x0, 0xcb, 0x0, 0xc00016ad00)
c:/go/src/io/ioutil/ioutil.go:52 +0x1c3
cmd/go/internal/cfg.initEnvCache()
c:/go/src/cmd/go/internal/cfg/cfg.go:174 +0x69
sync.(*Once).doSlow(0xea9b00, 0xa76800)
c:/go/src/sync/once.go:66 +0xf3
sync.(*Once).Do(...)
c:/go/src/sync/once.go:57
cmd/go/internal/cfg.Getenv(0xa2ac05, 0x4, 0xc0001480f0, 0x2b)
c:/go/src/cmd/go/internal/cfg/cfg.go:223 +0x15e
cmd/go/internal/cfg.envOr(...)
c:/go/src/cmd/go/internal/cfg/cfg.go:280
cmd/go/internal/cfg.defaultContext(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, ...)
c:/go/src/cmd/go/internal/cfg/cfg.go:74 +0x1ad
cmd/go/internal/cfg.init()
c:/go/src/cmd/go/internal/cfg/cfg.go:28 +0x3e
```
And the ```go build``` crash dump
```
Build output was runtime: gp: gp=0xc85e00, goid=505, gp->atomicstatus=3
runtime:  g:  g=0xc000484000, goid=0,  g->atomicstatus=0
fatal error: bad g status

runtime stack:
runtime.throw(0xa2f689, 0xc)
c:/go/src/runtime/panic.go:1116 +0x79
runtime.goschedImpl(0xc85e00)
c:/go/src/runtime/proc.go:2697 +0x264
runtime.gopreempt_m(0xc85e00)
c:/go/src/runtime/proc.go:2733 +0x3b
runtime.mcall(0x0)
c:/go/src/runtime/asm_amd64.s:318 +0x5e

goroutine 505 [syscall, locked to thread]:
runtime.cgocall(0x465180, 0xc0004802c8, 0x0)
c:/go/src/runtime/cgocall.go:133 +0x55 fp=0xc0005e7108 sp=0xc0005e70d0 
pc=0x404165
syscall.Syscall(0x7ffea4112080, 0x1, 0x40c, 0x0, 0x0, 0x0, 0x0, 0x0)
c:/go/src/runtime/syscall_windows.go:188 +0xe9 fp=0xc0005e7148 
sp=0xc0005e7108 pc=0x452589
syscall.CloseHandle(0x40c, 0xc00048, 0xc0005e7208)
c:/go/src/syscall/zsyscall_windows.go:354 +0x61 fp=0xc0005e7198 
sp=0xc0005e7148 pc=0x4b1231
internal/poll.(*FD).destroy(0xc000248000, 0x1, 0x0)
c:/go/src/internal/poll/fd_windows.go:454 +0xc1 fp=0xc0005e71d0 
sp=0xc0005e7198 pc=0x4d4621
internal/poll.(*FD).decref(0xc000248000, 0xc00022e001, 0xc0005e72a0)
c:/go/src/internal/poll/fd_mutex.go:213 +0x49 fp=0xc0005e71f8 
sp=0xc0005e71d0 pc=0x4d1ef9
internal/poll.(*FD).Close(0xc000248000, 0x8000, 0xc00042e000)
c:/go/src/internal/poll/fd_windows.go:472 +0x66 fp=0xc0005e7238 
sp=0xc0005e71f8 pc=0x4d4706
os.(*file).close(0xc000248000, 0xc000454000, 0x0)
c:/go/src/os/file_windows.go:205 +0x58 fp=0xc0005e7288 sp=0xc0005e7238 
pc=0x4e1038
os.(*File).Close(0xc00060e2c0, 0x17, 0xc00060e2c0)
c:/go/src/os/file_windows.go:193 +0x3a fp=0xc0005e72b0 sp=0xc0005e7288 
pc=0x4e0f8a
cmd/internal/buildid.ReadFile(0xc9e140, 0x17, 0xc00042e000, 0x53, 0x0, 
0x0)
c:/go/src/cmd/internal/buildid/buildid.go:47 +0x243 fp=0xc0005e7368 
sp=0xc0005e72b0 pc=0x82db13
cmd/go/internal/work.(*Builder).useCache(0xc9b680, 0xc9ca00, 
0xc79b40d6b3a32276, 0x37623314d08a90e8, 0x93951802e993f1f4, 
0xaf60a096d647cbd4, 0xc9e140, 0x17, 0x52414f47245f6863)
c:/go/src/cmd/go/internal/work/buildid.go:448 +0xf4c fp=0xc0005e7590 
sp=0xc0005e7368 pc=0x83db8c
cmd/go/internal/work.(*Builder).build(0xc9b680, 0xc9ca00, 0x0, 0x0)
c:/go/src/cmd/go/internal/work/exec.go:405 +0x5163 fp=0xc0005e7e70 
sp=0xc0005e7590 pc=0x8473f3
cmd/go/internal/work.(*Builder).Do.func2(0xc9ca00)
c:/go/src/cmd/go/internal/work/exec.go:118 +0x35f fp=0xc0005e7f10 
sp=0xc0005e7e70 pc=0x87501f
cmd/go/internal/work.(*Builder).Do.func3(0xc000212d30, 0xc9b680, 
0xc97da0)
c:/go/src/cmd/go/internal/work/exec.go:178 +0x7d fp=0xc0005e7fc8 
sp=0xc0005e7f10 pc=0x87514d
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc0005e7fd0 sp=0xc0005e7fc8 
pc=0x463701
created by cmd/go/internal/work.(*Builder).Do
c:/go/src/c

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

2020-05-04 Thread 'Than McIntosh' via golang-nuts
OK, thanks, that explains it.

When I compile the test file in question I get a prolog of

   0: 64 48 3b 24 25 70 00 cmp%fs:0x70,%rsp
   7: 00 00
   9: 73 12 jae1d 

Your prolog on the other hand looks like

   0:   f3 0f 1e fa *endbr64*
   4:   64 48 3b 24 25 70 00cmp%fs:0x70,%rsp
   b:   00 00
   d:   73 16   jae25 


Note the endbr64 -- this is coming from the GCC "-fcf-protection=branch"
command line option -- you aren't specifying this for your build, but most
likely it's being forced on intentionally by the provider of your linux
distro (or whoever built GCC), similar to the way some distros hard-wire on
PIE.

Thank you for reporting this problem.  I tested this scenario with tip of
trunk binutils and it looks as though it is still an issue. I will file a
binutils bug to report the issue and maybe also see about sending a fix if
I can.

In the mean time, one possible workaround would be for you to hard-wire off
this option in your Gollvm configure step.

Instead of running cmake as per the default installation instructions, you
can maybe try:

cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_LINKER=gold
*-DCMAKE_CXX_FLAGS='-fcf-protection=none'
-DCMAKE_C_FLAGS='-fcf-protection=none'* -G Ninja ../llvm-project/llvm

to see if that gets things back on line for you.

Thanks, Than






On Mon, May 4, 2020 at 8:23 AM Martins Eglitis 
wrote:

> Here is the output:
>
> /tmp/CheckSymbolExists.o: file format elf64-x86-64
>
> SYMBOL TABLE:
>  ldf *ABS* CheckSymbolExists.c
>  ld  .text .text
>  ld  .data .data
>  ld  .bss  .bss
>  ld  .text.main    .text.main
>  ld  .note.GNU-split-stack 
> .note.GNU-split-stack
>  ld  .note.GNU-stack   .note.GNU-stack
>  ld  .note.gnu.property    
> .note.gnu.property
>  ld  .eh_frame .eh_frame
>  ld  .comment  .comment
>  g F .text.main   004b main
>  *UND* __morestack
>  *UND* _GLOBAL_OFFSET_TABLE_
>  *UND* mmap
>
>
>
> Disassembly of section .text.main:
>
>  :
> main():
>0: f3 0f 1e fa endbr64
>4: 64 48 3b 24 25 70 00cmp%fs:0x70,%rsp
>b: 00 00
>d: 73 16   jae25 
>f: 41 ba 08 00 00 00   mov$0x8,%r10d
>   15: 41 bb 00 00 00 00   mov$0x0,%r11d
>   1b: e8 00 00 00 00  callq  20 
>   1c: R_X86_64_PLT32  __morestack-0x4
>   20: c3  retq
>   21: f3 0f 1e fa endbr64
>   25: 55  push   %rbp
>   26: 48 89 e5mov%rsp,%rbp
>   29: 89 7d fcmov%edi,-0x4(%rbp)
>   2c: 48 89 75 f0 mov%rsi,-0x10(%rbp)
>   30: 8b 45 fcmov-0x4(%rbp),%eax
>   33: 48 98   cltq
>   35: 48 8d 14 85 00 00 00lea0x0(,%rax,4),%rdx
>   3c: 00
>   3d: 48 8b 05 00 00 00 00mov0x0(%rip),%rax# 44 
>   40: R_X86_64_REX_GOTPCRELX  mmap-0x4
>   44: 48 01 d0add%rdx,%rax
>   47: 8b 00   mov(%rax),%eax
>   49: 5d  pop%rbp
>   4a: c3  retq
>
> On 2020-05-04 14:43, Than McIntosh wrote:
>
> Thanks!
>
> Could you also please run
>
> objdump -tldr /tmp/CheckSymbolExists.o
>
> and send me the output of that?
>
> Cheers, Than
>
>
> On Mon, May 4, 2020 at 7:37 AM Martins Eglitis 
> wrote:
>
>> Hi,
>>
>> I am getting output like this:
>>
>> /tmp/CheckSymbolExists.c: In function 'main':
>> /tmp/CheckSymbolExists.c:7:11: warning: ISO C forbids conversion of function 
>> pointer to object pointer type [-Wpedantic]
>> 7 |   return ((int*)(&mmap))[argc];
>>   |   ^
>> Using built-in specs.
>> COLLECT_GCC=/usr/bin/cc
>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
>> OFFLOAD_TARGET_NAMES=nvptx-none:hsa
>> OFFLOAD_TARGET_DEFAULT=1
>> Target: x86_64-linux-gnu
>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu 
>> 9.3.0-10ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs 
>> --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 
>> --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 
>> --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id 
>> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
>> --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug 
>> --enable-libstdcxx-time

[go-nuts] Re: Using FIPS-compliant boring Go to connect to microsoft.com(specifically)

2020-05-04 Thread Bhagya Prasad NR
(Disclaimer: Not a FIPS compliance expert)

Here's NIST position - https://csrc.nist.rip/groups/STM/cmvp/notices.html . 
As per the document "*At least one of the RSA modulus lengths supported by 
the module for RSA signature generation shall be 2048, 3072, or 4096 bits. 
The RSA signature algorithm implementations shall be tested by a CST lab 
for all implemented RSA modulus lengths where CAVS testing is available.*". 
As of last month such a testing to validate RSA 4096 bit keys is available 
is being tested (scroll down to RSA section) - 
https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?product=12388
 
. 

In summary dev.boringcrypto needs a fix to honor RSA 4096 bit keys to the 
least and reject anything less than 2048 bits. This will certainly benefit 
the projects using dev.boringcrypto and looking for FIPS validation. 

Regards,
Bhagya

On Monday, May 4, 2020 at 8:32:08 AM UTC-7, pradee...@gmail.com wrote:
>
> We are facing similar issues with dev.broingCrypto branch when using RSA 
> 4096. 
>
> See Page 195 of following link 
> https://csrc.nist.gov/csrc/media/projects/cryptographic-module-validation-program/documents/fips140-2/fips1402ig.pdf
>
> Question/Problem SP 800-131A Rev1 provides only the lower bound, 2048 
> bits, for the RSA modulus size used in signature generation. Does this 
> imply that the RSA modulus sizes other than 2048 and 3072 may be used to 
> generate the RSA signatures in the approved mode? In particular, is the use 
> of the 4096-bit modulus approved and, if so, what are the testing 
> requirements for the RSA key generation if the key pair used in the RSA 
> signature algorithm is generated by the module? 
>
> Resolution 
>
> When performing an RSA signature generation, a module may use any modulus 
> size greater than or equal to 2048 bits. At least one of the RSA modulus 
> lengths supported by the module for RSA signature generation shall be 2048, 
> 3072, or 4096 bits.
>
> On Monday, May 4, 2020 at 8:40:37 AM UTC+5:30, Bhagya Prasad NR wrote:
>>
>> (Disclaimer: Not a FIPS compliance expert)
>>
>> Couple of observations. I looked at how others are treating this by 
>> taking an example of OpenSSL 1.1.1 and Go's 1.12.4 distribution from CentOS 
>> 8.1 (which is derived from RHEL 8.1 and RHEL is inline for FIPS 140-2 
>> validation as we speak).  
>>
>> [1]. OpenSSL 1.1.1 FIPS patch (source: 
>> http://vault.centos.org/8.1.1911/BaseOS/Source/SPackages/openssl-1.1.1c-2.el8.src.rpm
>>  
>> ) allows RSA public key modulus bits greater than 1024 bits in size via 
>> OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 
>> (whose value is defined in rsa.h as 1048)
>>
>>
>> [2]. CentOS 8.1 's go lang distribution (source: 
>> http://vault.centos.org/8.1.1911/AppStream/Source/SPackages/golang-1.12.12-4.module_el8.1.0+271+e71148fc.src.rpm;
>>  
>> File: src/crypto/tls/boring.go) allows RSA public key modules bits greater 
>> than 2048 and its size divisible by 512 as valid RSA public keys. 
>>
>>
>> Attaching relevant screenshots below.  Does this tell there is a need for 
>> a patch in golang's dev.boringcrypto branch to allow RSA 4096 bit keys?  
>> Has anyone encountered the issue by using dev.boringcrypto distribution? 
>>
>> Thanks!
>> Bhagya
>>
>> On Thursday, April 30, 2020 at 11:13:18 AM UTC-7, mohit@gmail.com 
>> wrote:
>>>
>>> Summary - Trying Boring Go in FIPS mode to connect to Microsoft services 
>>> (Azure). Intermediate CA Certificate for Microsoft has a 4096 bit public 
>>> key that is not allowed by Boring Go (Code here 
>>> 
>>>  
>>> ), Is there any workaround without having to turn off FIPS mode ?
>>>
>>> go version go1.14b4 linux/amd64
>>>
>>> Hi all,
>>> So I am working on an application that requires to be run in FIPS mode 
>>> and has to connect to Azure services. I looked up the boring Go branch, got 
>>> version 1.14 and started using it.
>>> While trying to connect to Azure services (for eg. 
>>> graph[dot]microsoft[dot]com or even microsoft[dot]com), I was getting an 
>>> incompatible certificate usage issue. Here is the sample code I am using -
>>> `package main
>>>
>>> import (
>>> "fmt"
>>> "io/ioutil"
>>> "net/http"
>>> _ "crypto/tls/fipsonly" //Code works without this but we need the 
>>> application to run in FIPS
>>> )
>>> func main() {
>>> url := "https: //microsoft.com" //Space put here because of two 
>>> link limit
>>> fmt.Printf("HTML code of %s ...\n", url)
>>> client := &http.Client{}
>>> resp, err := client.Get(url)
>>> 
>>> if err != nil {
>>> panic(err)
>>> }
>>>
>>> defer resp.Body.Close()
>>> 
>>> html, err := ioutil.ReadAll(resp.Body)
>>> if err != nil {
>>> panic(err)
>>> }
>>> 
>>> fmt.Printf("%s\n", html)
>>> }`
>>>
>>> The erro

Re: [go-nuts] Re: Using FIPS-compliant boring Go to connect to microsoft.com(specifically)

2020-05-04 Thread David Anderson
The next step then is to file a bug on Github to discuss this. That way
you'll get an authoritative answer from boringcrypto's devs, one way or the
other (authoritative in the sense of "yes we will take such a patch/no we
won't take such a patch", not authoritative in the sense of "yes this is
definitely FIPS-140-2 compliant").

- Dave

On Mon, May 4, 2020 at 10:23 AM Bhagya Prasad NR  wrote:

> (Disclaimer: Not a FIPS compliance expert)
>
> Here's NIST position - https://csrc.nist.rip/groups/STM/cmvp/notices.html
> . As per the document "*At least one of the RSA modulus lengths supported
> by the module for RSA signature generation shall be 2048, 3072, or 4096
> bits. The RSA signature algorithm implementations shall be tested by a CST
> lab for all implemented RSA modulus lengths where CAVS testing is
> available.*". As of last month such a testing to validate RSA 4096 bit
> keys is available is being tested (scroll down to RSA section) -
> https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/details?product=12388
> .
>
> In summary dev.boringcrypto needs a fix to honor RSA 4096 bit keys to the
> least and reject anything less than 2048 bits. This will certainly benefit
> the projects using dev.boringcrypto and looking for FIPS validation.
>
> Regards,
> Bhagya
>
> On Monday, May 4, 2020 at 8:32:08 AM UTC-7, pradee...@gmail.com wrote:
>>
>> We are facing similar issues with dev.broingCrypto branch when using RSA
>> 4096.
>>
>> See Page 195 of following link
>> https://csrc.nist.gov/csrc/media/projects/cryptographic-module-validation-program/documents/fips140-2/fips1402ig.pdf
>>
>> Question/Problem SP 800-131A Rev1 provides only the lower bound, 2048
>> bits, for the RSA modulus size used in signature generation. Does this
>> imply that the RSA modulus sizes other than 2048 and 3072 may be used to
>> generate the RSA signatures in the approved mode? In particular, is the use
>> of the 4096-bit modulus approved and, if so, what are the testing
>> requirements for the RSA key generation if the key pair used in the RSA
>> signature algorithm is generated by the module?
>>
>> Resolution
>>
>> When performing an RSA signature generation, a module may use any modulus
>> size greater than or equal to 2048 bits. At least one of the RSA modulus
>> lengths supported by the module for RSA signature generation shall be 2048,
>> 3072, or 4096 bits.
>>
>> On Monday, May 4, 2020 at 8:40:37 AM UTC+5:30, Bhagya Prasad NR wrote:
>>>
>>> (Disclaimer: Not a FIPS compliance expert)
>>>
>>> Couple of observations. I looked at how others are treating this by
>>> taking an example of OpenSSL 1.1.1 and Go's 1.12.4 distribution from CentOS
>>> 8.1 (which is derived from RHEL 8.1 and RHEL is inline for FIPS 140-2
>>> validation as we speak).
>>>
>>> [1]. OpenSSL 1.1.1 FIPS patch (source:
>>> http://vault.centos.org/8.1.1911/BaseOS/Source/SPackages/openssl-1.1.1c-2.el8.src.rpm
>>> ) allows RSA public key modulus bits greater than 1024 bits in size via 
>>> OPENSSL_RSA_FIPS_MIN_MODULUS_BITS
>>> (whose value is defined in rsa.h as 1048)
>>>
>>>
>>> [2]. CentOS 8.1 's go lang distribution (source:
>>> http://vault.centos.org/8.1.1911/AppStream/Source/SPackages/golang-1.12.12-4.module_el8.1.0+271+e71148fc.src.rpm;
>>> File: src/crypto/tls/boring.go) allows RSA public key modules bits greater
>>> than 2048 and its size divisible by 512 as valid RSA public keys.
>>>
>>>
>>> Attaching relevant screenshots below.  Does this tell there is a need
>>> for a patch in golang's dev.boringcrypto branch to allow RSA 4096 bit
>>> keys?  Has anyone encountered the issue by using dev.boringcrypto
>>> distribution?
>>>
>>> Thanks!
>>> Bhagya
>>>
>>> On Thursday, April 30, 2020 at 11:13:18 AM UTC-7, mohit@gmail.com
>>> wrote:

 Summary - Trying Boring Go in FIPS mode to connect to Microsoft
 services (Azure). Intermediate CA Certificate for Microsoft has a 4096 bit
 public key that is not allowed by Boring Go (Code here
 
 ), Is there any workaround without having to turn off FIPS mode ?

 go version go1.14b4 linux/amd64

 Hi all,
 So I am working on an application that requires to be run in FIPS mode
 and has to connect to Azure services. I looked up the boring Go branch, got
 version 1.14 and started using it.
 While trying to connect to Azure services (for eg.
 graph[dot]microsoft[dot]com or even microsoft[dot]com), I was getting an
 incompatible certificate usage issue. Here is the sample code I am using -
 `package main

 import (
 "fmt"
 "io/ioutil"
 "net/http"
 _ "crypto/tls/fipsonly" //Code works without this but we need the 
 application to run in FIPS
 )
 func main() {
 url := "https: //microsoft.com" //Space put here because of two 
 link limit
 fmt.Prin

Re: [go-nuts] tracing latency issue

2020-05-04 Thread Robert Engels
You might want to look at github.com/robaho/goanalyzer which I think is more 
useful when doing latency analysis. 

> On May 4, 2020, at 10:13 AM, yafimk  wrote:
> 
> Hey all,
> I've been trying to optimize a simple dns resolver i've built.
> Its intended to run on relatively small linux based machines with 1 cpu 
> usually and not a lot of ram.
> Now, I'm testing it with some load testing tool (flamethrower) and im seeing 
> constant average of response on those machines. (on my dev machine i've 
> limited number of cores to 1 and seeing better results).
> this is for several seconds - i think i see good behavior for some ms but 
> then i see that one of the threads goes to syscall and the other isnt running.
> 
> 
> 
> 
> zoom up to one of those "holes" - 
> 
> 
> 
> there are several calls happening but mostly nothing happens here for several 
> hunderd ms (which has an impact on our results)
> on the other hand -  i have this area - in which everything seems to go fine 
> till one thread is moving to sys call (green) and the other stops running 
> (pink) -
> 
> 
> My main question would be - where should i focus to optimize next?
> Is it possible that this is simply due to system constraints and i don't have 
> much to do here? (beside maybe memory optimizations... ) 
> 
> thanks ahead.
> 
> 
> 
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/b38db88e-ee47-4d8b-8335-c3d675264ae8%40googlegroups.com.
> 
> 
> 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3EB3D167-3F65-4042-BA2F-17406B4EB2A1%40ix.netcom.com.


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

2020-05-04 Thread 洪嘉鴻
I tried to get and install the package 
.
However, when I use "go get github.com/robaho/go-trader", it displayed 
"package github.com/robaho/go-trader: no Go files in 
"$GOPATH\src\github.com\robaho\go-trader".
I use 1.12.9 of go version on Windows 10.
Is the version that I used not suitable?

Thanks for your replying.
Max

Robert Engels於 2020年5月4日星期一 UTC+8下午9時06分08秒寫道:
>
> Look at github.com/robaho/go-trader
>
> It has a nice example of using gcui 
>
> On May 3, 2020, at 11:06 PM, 洪嘉鴻 > wrote:
>
> 
> I see.
> Actually I only want to make a simple application.
> The application is about segmenting two text-boxes for input and output.
> I've tried this  and it seems good, 
> except for the complicated example such as "demo".
> (The terminal emulator on Windows really mess "demo" up.)
> However, it seems that there is not any functions to scan input with 
> "termui".
> The answer I found from this  
> could't 
> solve the problem because the the type "Attribute" and "TextBuilder" are 
> undefined within "input.go".
> I've just asked the author.
> Besides, I've also tried Tcell .
> However, there is not more examples for learning.
> Did you find any examples and could you offer the link?
>
> Thanks for your replying.
> Max
>
> Jason E. Aten於 2020年5月4日星期一 UTC+8上午9時45分57秒寫道:
>>
>> You didn't take my meaning. The reason the examples don't work on Windows 
>> is because the terminal emulator on Windows is messing them up.
>>
>> https://github.com/gdamore/proxima5 is an example. Tcell is cross 
>> platform.
>>
> -- 
> 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 golan...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/3aaf75d8-d992-4612-91c4-ae73094f8157%40googlegroups.com
>  
> 
> .
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/bd8aca98-4ec2-4ded-9636-bae621588b2a%40googlegroups.com.


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

2020-05-04 Thread Kurtis Rader
On Mon, May 4, 2020 at 7:13 PM 洪嘉鴻  wrote:

> I tried to get and install the package
> .
> However, when I use "go get github.com/robaho/go-trader", it displayed
> "package github.com/robaho/go-trader: no Go files in "$GOPATH\src\
> github.com\robaho\go-trader".
> I use 1.12.9 of go version on Windows 10.
> Is the version that I used not suitable?
>

Works for me. If you're doing that at work there is probably a firewall
that is disrupting the "go get" network traffic. Regardless, since all you
want to do is download the source to review it just do "git clone https://
github.com/robaho/go-trader". And if that doesn't work you need to figure
out what is wrong with your connection to the Internet.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-J_pkX08z94WKTKWYWYLv_FXq0ZqMt5pRv7uoe1%2Baa_Q%40mail.gmail.com.


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

2020-05-04 Thread 洪嘉鴻
I've downloaded from git clone.
However, there was a message that displayed "use of internal package 
github.com/robaho/go-trader/internal/exchange not allowed" with "algo.go".
I'm sure that there does a file "exchange" in the directory.
Therefore, I have no idea what causes the problem and how to edit.

Thanks for your replying.
Max
 



Kurtis Rader於 2020年5月5日星期二 UTC+8上午10時25分05秒寫道:
>
> On Mon, May 4, 2020 at 7:13 PM 洪嘉鴻 > 
> wrote:
>
>> I tried to get and install the package 
>> .
>> However, when I use "go get github.com/robaho/go-trader", it displayed 
>> "package github.com/robaho/go-trader: no Go files in "$GOPATH\src\
>> github.com\robaho\go-trader".
>> I use 1.12.9 of go version on Windows 10.
>> Is the version that I used not suitable?
>>
>
> Works for me. If you're doing that at work there is probably a firewall 
> that is disrupting the "go get" network traffic. Regardless, since all you 
> want to do is download the source to review it just do "git clone https://
> github.com/robaho/go-trader". And if that doesn't work you need to figure 
> out what is wrong with your connection to the Internet.
>
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/51c049be-bdd3-468b-9d2a-ec307698fd9b%40googlegroups.com.


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

2020-05-04 Thread robert engels
There is no file algo.go in the repo so I am not sure what you are doing.

I just tested cmd/algo with Intellij and it ran fine.

You would be interested in the file cmd/client/main.go to see how to use gocui.

> On May 4, 2020, at 10:15 PM, 洪嘉鴻  wrote:
> 
> I've downloaded from git clone.
> However, there was a message that displayed "use of internal package 
> github.com/robaho/go-trader/internal/exchange not allowed" with "algo.go".
> I'm sure that there does a file "exchange" in the directory.
> Therefore, I have no idea what causes the problem and how to edit.
> 
> Thanks for your replying.
> Max
>  
> 
> 
> 
> Kurtis Rader於 2020年5月5日星期二 UTC+8上午10時25分05秒寫道:
> On Mon, May 4, 2020 at 7:13 PM 洪嘉鴻 > wrote:
> I tried to get and install the package .
> However, when I use "go get github.com/robaho/go-trader 
> ", it displayed "package 
> github.com/robaho/go-trader : no Go files 
> in "$GOPATH\src\github.com \robaho\go-trader".
> I use 1.12.9 of go version on Windows 10.
> Is the version that I used not suitable?
> 
> Works for me. If you're doing that at work there is probably a firewall that 
> is disrupting the "go get" network traffic. Regardless, since all you want to 
> do is download the source to review it just do "git clone 
> https://github.com/robaho/go-trader ". 
> And if that doesn't work you need to figure out what is wrong with your 
> connection to the Internet.
> 
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
> 
> -- 
> 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 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/51c049be-bdd3-468b-9d2a-ec307698fd9b%40googlegroups.com
>  
> .

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/558C97C1-546B-425F-856D-7600591E7F8F%40ix.netcom.com.


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

2020-05-04 Thread Kurtis Rader
On Mon, May 4, 2020 at 8:15 PM 洪嘉鴻  wrote:

> I've downloaded from git clone.
> However, there was a message that displayed "use of internal package
> github.com/robaho/go-trader/internal/exchange not allowed" with "algo.go".
> I'm sure that there does a file "exchange" in the directory.
> Therefore, I have no idea what causes the problem and how to edit.
>

 There is no way that "git clone" produced that error message. You need to
tell us what command you ran that resulted in that error. However, I
suspect you ran "go build" or something similar. My suggestion to run "git
clone" was predicated on you wanting to just review the source code; not
build it. If you want to be able to build it, and import it into other
projects, then you need to figure out why "go get" doesn't work on your
system.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD92kYLoTOJTRLkPpU8dFPwO7_1hP6n564%2BpUOHvvPzehQ%40mail.gmail.com.


[go-nuts] handling constant of maps

2020-05-04 Thread Amarjeet Anand
Hi

I want to declare a constant that maps an *ErrorCode*(string) like "100.01" 
to its *ErrorDescription*(string) like "Error description of 100.01".
Declaring Error as *code* and *description* is helpful to monitor logs 
based based on *ErrorCode* and show the *ErrorDescription* to the client.

Although go cannot create constant of type map, but it can be achieved in 
multiple ways.




-
One possible way can be :- 


type ErrorCode string

const (
   E270_01 ErrorCode = "270.01"
   E270_02   = "270.02"
)

var ErrDescription = map[ErrorCode]string{
   E270_01: "this is error description",
   E270_02: "this is error description",
}

type LogErr struct {
   CodeErrorCode
   Description string
}

func getLogErr(e ErrorCode) LogErr {
   return LogErr{
  Code:e,
  Description: ErrDescription[e],
   }
}

func TestErrorConstant(t *testing.T) {
   fmt.Println(getLogErr(E270_01))
}



This solves our purpose. But the problem is for every new error, we need to 
change things at two places, (1) Declare const like E270_02 (2) Add an entry in 
the *ErrDescription* map



-

Another possible way looks like :- 


type ErrorCode string

const (
   E270_01 ErrorCode = "270.01:this is error description"
   E270_02   = "270.02:this is error description"
)

type LogErr struct {
   Codestring
   Description string
}

func getLogErr(e ErrorCode) LogErr {
  * token := strings.Split(string(e), ":")*
   return LogErr{
  Code:token[0],
  Description: token[1],
   }
}

func TestErrorConstant(t *testing.T) {
   fmt.Println(getLogErr(E270_01))
}



This way looks promising, but don't really like the way of splitting string 
using ":"




-

I think best way could have been something like ---

const (
   E270_01 ErrorCode = {"270.01", "this is error description"}
)



Since Golang doesn't support the Constant of struct, what could be your 
approach?

Any suggestion is really appreciated.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/198455c0-4f81-4e2f-a166-72796a15d498%40googlegroups.com.


Re: [go-nuts] handling constant of maps

2020-05-04 Thread Kurtis Rader
See https://blog.golang.org/generate and
https://godoc.org/golang.org/x/tools/cmd/stringer for an example of a now
standard Go tool that seems to do what you want.

On Mon, May 4, 2020 at 9:30 PM Amarjeet Anand  wrote:

> Hi
>
> I want to declare a constant that maps an *ErrorCode*(string) like
> "100.01" to its *ErrorDescription*(string) like "Error description of
> 100.01".
> Declaring Error as *code* and *description* is helpful to monitor logs
> based based on *ErrorCode* and show the *ErrorDescription* to the client.
>
> Although go cannot create constant of type map, but it can be achieved in
> multiple ways.
>
> 
> 
> 
> -
> One possible way can be :-
>
>
> type ErrorCode string
>
> const (
>E270_01 ErrorCode = "270.01"
>E270_02   = "270.02"
> )
>
> var ErrDescription = map[ErrorCode]string{
>E270_01: "this is error description",
>E270_02: "this is error description",
> }
>
> type LogErr struct {
>CodeErrorCode
>Description string
> }
>
> func getLogErr(e ErrorCode) LogErr {
>return LogErr{
>   Code:e,
>   Description: ErrDescription[e],
>}
> }
>
> func TestErrorConstant(t *testing.T) {
>fmt.Println(getLogErr(E270_01))
> }
>
>
>
> This solves our purpose. But the problem is for every new error, we need to 
> change things at two places, (1) Declare const like E270_02 (2) Add an entry 
> in the *ErrDescription* map
>
>
>
> -
>
> Another possible way looks like :-
>
>
> type ErrorCode string
>
> const (
>E270_01 ErrorCode = "270.01:this is error description"
>E270_02   = "270.02:this is error description"
> )
>
> type LogErr struct {
>Codestring
>Description string
> }
>
> func getLogErr(e ErrorCode) LogErr {
>   * token := strings.Split(string(e), ":")*
>return LogErr{
>   Code:token[0],
>   Description: token[1],
>}
> }
>
> func TestErrorConstant(t *testing.T) {
>fmt.Println(getLogErr(E270_01))
> }
>
>
>
> This way looks promising, but don't really like the way of splitting string 
> using ":"
>
>
>
>
> -
>
> I think best way could have been something like ---
>
> const (
>E270_01 ErrorCode = {"270.01", "this is error description"}
> )
>
>
>
> Since Golang doesn't support the Constant of struct, what could be your
> approach?
>
> Any suggestion is really appreciated.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/198455c0-4f81-4e2f-a166-72796a15d498%40googlegroups.com
> 
> .
>


-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD9hPx%2BHXNQogkPdOj53YxBDgHte6q0TTpaNrbOh5sPpdA%40mail.gmail.com.


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

2020-05-04 Thread 洪嘉鴻
Here are the pictures that I tested and displayed panic error.
I have no idea what causes the problem.

[image: algo.PNG] [image: 
client.PNG]














Thank you very much!
Max


robert engels於 2020年5月5日星期二 UTC+8上午11時26分02秒寫道:
>
> There is no file algo.go in the repo so I am not sure what you are doing.
>
> I just tested cmd/algo with Intellij and it ran fine.
>
> You would be interested in the file cmd/client/main.go to see how to use 
> gocui.
>
> On May 4, 2020, at 10:15 PM, 洪嘉鴻 > wrote:
>
> I've downloaded from git clone.
> However, there was a message that displayed "use of internal package 
> github.com/robaho/go-trader/internal/exchange not allowed" with "algo.go".
> I'm sure that there does a file "exchange" in the directory.
> Therefore, I have no idea what causes the problem and how to edit.
>
> Thanks for your replying.
> Max
>  
>
>
>
> Kurtis Rader於 2020年5月5日星期二 UTC+8上午10時25分05秒寫道:
>>
>> On Mon, May 4, 2020 at 7:13 PM 洪嘉鴻  wrote:
>>
>>> I tried to get and install the package 
>>> .
>>> However, when I use "go get github.com/robaho/go-trader", it displayed 
>>> "package github.com/robaho/go-trader: no Go files in "$GOPATH\src\
>>> github.com\robaho\go-trader".
>>> I use 1.12.9 of go version on Windows 10.
>>> Is the version that I used not suitable?
>>>
>>
>> Works for me. If you're doing that at work there is probably a firewall 
>> that is disrupting the "go get" network traffic. Regardless, since all you 
>> want to do is download the source to review it just do "git clone https://
>> github.com/robaho/go-trader". And if that doesn't work you need to 
>> figure out what is wrong with your connection to the Internet.
>>
>> -- 
>> Kurtis Rader
>> Caretaker of the exceptional canines Junior and Hank
>>
>
> -- 
> 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 golan...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/51c049be-bdd3-468b-9d2a-ec307698fd9b%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/0479e3bf-3dea-46ff-bb36-46dea4d7b751%40googlegroups.com.


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

2020-05-04 Thread 洪嘉鴻
Here are the pictures that I tested and displayed panic error.
I have no idea what causes the problem.

[image: client.PNG][image: algo.PNG] 

Thank you very much!
Max


robert engels於 2020年5月5日星期二 UTC+8上午11時26分02秒寫道:
>
> There is no file algo.go in the repo so I am not sure what you are doing.
>
> I just tested cmd/algo with Intellij and it ran fine.
>
> You would be interested in the file cmd/client/main.go to see how to use 
> gocui.
>
> On May 4, 2020, at 10:15 PM, 洪嘉鴻 > wrote:
>
> I've downloaded from git clone.
> However, there was a message that displayed "use of internal package 
> github.com/robaho/go-trader/internal/exchange not allowed" with "algo.go".
> I'm sure that there does a file "exchange" in the directory.
> Therefore, I have no idea what causes the problem and how to edit.
>
> Thanks for your replying.
> Max
>  
>
>
>
> Kurtis Rader於 2020年5月5日星期二 UTC+8上午10時25分05秒寫道:
>>
>> On Mon, May 4, 2020 at 7:13 PM 洪嘉鴻  wrote:
>>
>>> I tried to get and install the package 
>>> .
>>> However, when I use "go get github.com/robaho/go-trader", it displayed 
>>> "package github.com/robaho/go-trader: no Go files in "$GOPATH\src\
>>> github.com\robaho\go-trader".
>>> I use 1.12.9 of go version on Windows 10.
>>> Is the version that I used not suitable?
>>>
>>
>> Works for me. If you're doing that at work there is probably a firewall 
>> that is disrupting the "go get" network traffic. Regardless, since all you 
>> want to do is download the source to review it just do "git clone https://
>> github.com/robaho/go-trader". And if that doesn't work you need to 
>> figure out what is wrong with your connection to the Internet.
>>
>> -- 
>> Kurtis Rader
>> Caretaker of the exceptional canines Junior and Hank
>>
>
> -- 
> 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 golan...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/51c049be-bdd3-468b-9d2a-ec307698fd9b%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/22594025-791a-43c7-9c16-8d92aa3791a3%40googlegroups.com.


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

2020-05-04 Thread 洪嘉鴻
I didn't run "go build".
The message was displayed under the problem of Visual Studio Code.
However, the message was disappeared after I restart the source code.

Thank you very much!
Max

Kurtis Rader於 2020年5月5日星期二 UTC+8上午11時33分15秒寫道:
>
> On Mon, May 4, 2020 at 8:15 PM 洪嘉鴻 > 
> wrote:
>
>> I've downloaded from git clone.
>> However, there was a message that displayed "use of internal package 
>> github.com/robaho/go-trader/internal/exchange not allowed" with 
>> "algo.go".
>> I'm sure that there does a file "exchange" in the directory.
>> Therefore, I have no idea what causes the problem and how to edit.
>>
>
>  There is no way that "git clone" produced that error message. You need to 
> tell us what command you ran that resulted in that error. However, I 
> suspect you ran "go build" or something similar. My suggestion to run "git 
> clone" was predicated on you wanting to just review the source code; not 
> build it. If you want to be able to build it, and import it into other 
> projects, then you need to figure out why "go get" doesn't work on your 
> system.
>
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6ae3cf71-61fc-47ce-a41a-bb4386387b55%40googlegroups.com.