1. Note that you can just write `NewMessage(&MessageA{}, buf)` in your
example, as the type can be inferred.
2. You can use a constraint on a pointer-receiver to somewhat simplify
that: https://go.dev/play/p/pEu02Bn9t3f
That is not *quite* what you are asking for. It is not actually possible to
rea
Hi all,
Assume I have a tcp server with incoming tcp packets which can be decoded
in differently depending on some headers in that packet.
Each message that comes in has a struct associated with it which can be
created with the traditionale NewX..(buf []byte ...). After creating the
object (or
see https://pkg.go.dev/net/http#Client.Jar
- sean
- sean
On Fri, Dec 29, 2023 at 6:53 PM vlya...@gmail.com wrote:
>
> I use generic https client code to perform GET:
> tr := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify:
> true}, }
> client := &http.Client{ Transport: tr,
I use generic https client code to perform GET:
tr := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true
}, }
client := &http.Client{ Transport: tr, }
req, err := http.NewRequest("GET", url, nil)
...
resp, err := client.Do(req)
for most urls it works fine but for some
Use https://pkg.go.dev/cloud.google.com/go/firestore#NewClientWithDatabase
to specify the databaseID.
On Wednesday, December 27, 2023 at 11:51:02 PM UTC-5 Alex Breadman wrote:
> I want multi-tenancy but there is no clear documentation.
>
> Is it supported yet in the firebase/firestore packages y