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 >

[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.

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. >

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. >

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

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\ >

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

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

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

[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

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

[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

[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,

[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

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,

[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.

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': >

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*)())[argc]; | ^ Using built-in specs.

[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.

[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?

[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

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

2020-05-04 Thread Tamás Gulácsi
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