Re: [go-nuts] Minor Omission in List on https://pkg.go.dev/golang.org/x

2023-03-10 Thread 'Sean Liao' via golang-nuts
https://go.dev/issue/56482

- sean


On Sat, Mar 11, 2023 at 7:35 AM Ian Lance Taylor  wrote:

> On Fri, Mar 10, 2023 at 2:54 PM jlfo...@berkeley.edu
>  wrote:
> >
> > Shouldn't "term" be included in the list shown on
> https://pkg.go.dev/golang.org/x?
> >
> > Going directly to https://pkg.go.dev/golang.org/x/term appears to work
> fine.
>
> Probably.
>
> I believe that there is an explicit list in
> golang.org/x/website/_content/pkgroot.tmpl.
>
> Ian
>
> --
> 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/CAOyqgcU%3DD4k6Pch3wZ5fgk8mHcXJ6_Wdn%3DtgX134jaVvKQoJCg%40mail.gmail.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/CAGabyPrLseZ%3DYmnSt2hgF0ufCjmmejRuYygDTPO%3DHvLVhpCa%2BA%40mail.gmail.com.


Re: [go-nuts] Minor Omission in List on https://pkg.go.dev/golang.org/x

2023-03-10 Thread Ian Lance Taylor
On Fri, Mar 10, 2023 at 2:54 PM jlfo...@berkeley.edu
 wrote:
>
> Shouldn't "term" be included in the list shown on 
> https://pkg.go.dev/golang.org/x?
>
> Going directly to https://pkg.go.dev/golang.org/x/term appears to work fine.

Probably.

I believe that there is an explicit list in
golang.org/x/website/_content/pkgroot.tmpl.

Ian

-- 
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/CAOyqgcU%3DD4k6Pch3wZ5fgk8mHcXJ6_Wdn%3DtgX134jaVvKQoJCg%40mail.gmail.com.


[go-nuts] Minor Omission in List on https://pkg.go.dev/golang.org/x

2023-03-10 Thread jlfo...@berkeley.edu
Shouldn't "term" be included in the list shown on 
https://pkg.go.dev/golang.org/x?

Going directly to https://pkg.go.dev/golang.org/x/term appears to work fine.

Jon

-- 
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/7e50ed7c-d763-47e9-932e-3217eaa9084cn%40googlegroups.com.


Re: [go-nuts] How to encode/decode string to binary in golang

2023-03-10 Thread Alex Howarth
If s1 and s2 are a fixed length then you can just slice up the decoded
string based on the lengths. If they are of a variable length, you'll need
a separator in the input string to later split on when decoded (s3 := s1 +
":" + s2 etc)?

On Fri, 10 Mar 2023 at 10:33, Van Fury  wrote:

> Hi,
>
> I have two hexadecimal string values and would like to concatenate the two
> strings and
>
>1. encode the result to binary
>2. decode the resulting binary back to hexadecimal string
>
> I did the following but I was finding it difficult to decode the result
> back. I ignore error check in this case.
>
> What i did so far:
>
> s1 := "1d28ed66824aa2593e1f2a4cf740343f"
>
> s2 := "dee2bd5dde763885944bc9d65419"
>
> s3 := s1 + s2
>
> s1s2Byte, _ := hex.DecodeString(s3)
>
> randAutnBin := fmt.Sprintf("%b", s1s2Byte)
>
> result:
>
> [11101 101000 11101101 1100110 1010 1001010 10100010 1011001 10
> 1 101010 1001100 0111 100 110100 11 1100 11100010
> 1001 1011101 1100 1110110 111000 1101 10010100 1001011 11001001
> 11010110 1010100 11001]
>
> I would like to decode the binary result back the hexadecimal string to
> get s1 and s2.
>
> Any help?
>
> Van
>
> --
> 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/ad3a981b-cf22-47cd-9fe6-8db83a097b42n%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/CAB-c0PcY4Gc2FQGqxjwA7tKYYACxio6KXFpyGkSMOHLmfaX7GQ%40mail.gmail.com.


Re: [go-nuts] How to encode/decode string to binary in golang

2023-03-10 Thread Kurtis Rader
Perhaps I have misunderstood your question but
doesn't hex.EncodeToString(s1s2Byte) do what you want?

On Fri, Mar 10, 2023 at 7:33 AM Van Fury  wrote:

> Hi,
>
> I have two hexadecimal string values and would like to concatenate the two
> strings and
>
>1. encode the result to binary
>2. decode the resulting binary back to hexadecimal string
>
> I did the following but I was finding it difficult to decode the result
> back. I ignore error check in this case.
>
> What i did so far:
>
> s1 := "1d28ed66824aa2593e1f2a4cf740343f"
>
> s2 := "dee2bd5dde763885944bc9d65419"
>
> s3 := s1 + s2
>
> s1s2Byte, _ := hex.DecodeString(s3)
>
> randAutnBin := fmt.Sprintf("%b", s1s2Byte)
>
> result:
>
> [11101 101000 11101101 1100110 1010 1001010 10100010 1011001 10
> 1 101010 1001100 0111 100 110100 11 1100 11100010
> 1001 1011101 1100 1110110 111000 1101 10010100 1001011 11001001
> 11010110 1010100 11001]
>
> I would like to decode the binary result back the hexadecimal string to
> get s1 and s2.
>
> Any help?
>
> Van
>
> --
> 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/ad3a981b-cf22-47cd-9fe6-8db83a097b42n%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%3DD-vLFhw6U2PDx%2BQzy%3DvXCGR6ThpLQehCN3JysQE26R00Q%40mail.gmail.com.


Re: [go-nuts] "go test": common prefix for errors

2023-03-10 Thread 'Sean Liao' via golang-nuts
implementing a helper/wrapper on your side might be easier, I believe most
helpers take the TB interface rather than the concrete T type.
also it sounds more like a failure of the application to separate its
output streams properly.

-- 
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/CAGabyPrOQ1%2B4%2BLiGQx4G4wgy6Ki%2BtQyLkeH%2Bu3GrXD_YsPGyvQ%40mail.gmail.com.


Re: [go-nuts] "go test": common prefix for errors

2023-03-10 Thread 'Patrick Ohly' via golang-nuts
"-v" only changes how the result is presented. It doesn't change the result 
itself, i.e. it remains unclear which log message indicates the actual 
failure inside the test.

Jason E. Aten schrieb am Freitag, 10. März 2023 um 11:28:56 UTC+1:

> Perhaps the -v flag to "go test" would be helpful here, as in "go test -v".
>
> On Friday, March 10, 2023 at 7:27:48 AM UTC Patrick Ohly wrote:
>
>> JSON output doesn't help. There's no indication there either that a 
>> certain message is a test failure. That's because t.Error = t.Log + 
>> t.Fail. Attached is an example.
>>
>> Bye,  Patrick
>>
>>

-- 
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/83016c7f-b340-45ea-9ed3-355e90281346n%40googlegroups.com.


[go-nuts] How to encode/decode string to binary in golang

2023-03-10 Thread Van Fury
Hi,

I have two hexadecimal string values and would like to concatenate the two 
strings and

   1. encode the result to binary
   2. decode the resulting binary back to hexadecimal string

I did the following but I was finding it difficult to decode the result 
back. I ignore error check in this case.

What i did so far:

s1 := "1d28ed66824aa2593e1f2a4cf740343f" 

s2 := "dee2bd5dde763885944bc9d65419"

s3 := s1 + s2 

s1s2Byte, _ := hex.DecodeString(s3)

randAutnBin := fmt.Sprintf("%b", s1s2Byte)

result:

[11101 101000 11101101 1100110 1010 1001010 10100010 1011001 10 
1 101010 1001100 0111 100 110100 11 1100 11100010 
1001 1011101 1100 1110110 111000 1101 10010100 1001011 11001001 
11010110 1010100 11001]

I would like to decode the binary result back the hexadecimal string to get 
s1 and s2.

Any help?

Van

-- 
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/ad3a981b-cf22-47cd-9fe6-8db83a097b42n%40googlegroups.com.


Re: [go-nuts] "go test": common prefix for errors

2023-03-10 Thread Jason E. Aten
Perhaps the -v flag to "go test" would be helpful here, as in "go test -v".

On Friday, March 10, 2023 at 7:27:48 AM UTC Patrick Ohly wrote:

> JSON output doesn't help. There's no indication there either that a 
> certain message is a test failure. That's because t.Error = t.Log + t.Fail. 
> Attached is an example.
>
> Bye,  Patrick
>
>

-- 
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/e2a8368f-1bca-4421-8401-7d56e28d33d3n%40googlegroups.com.