Re: [go-nuts] Re: memory issues

2023-02-09 Thread Marcello H
You could actually make a stress test inside a main_test.go with a benchmark for example, run that locally and see. It works over here btw. package main_test import ( "net/http" "net/http/httptest" "testing" "github.com/gorilla/mux" "github.com/stretchr/testify/assert" ) func pingServer(w

[go-nuts] Re: memory issues

2023-02-09 Thread James Dornan
I did, with the same results. I've attached stack trace from docker logs and the files to recreate this issue, Dockerfile and main.go. Steps to recreate docker build -t pingtest . docker run -p 8001:80 pingtest ab -c 500 -n 5 http://localhost:8001/ping The result for my, from ab, was

Re: [go-nuts] Error Handling

2023-02-09 Thread ben...@gmail.com
I agree with Axel that a function like errReturn is a bad idea, though if Go updates/improves error handling, it's possible we'll get something like that (some of the error handling proposals have been similar to errReturn). However, I don't see anything wrong with a function like Richard's

Re: [go-nuts] GO generics - function implementation

2023-02-09 Thread 'Axel Wagner' via golang-nuts
These look like homework assignments. You should be aware that if that's the case, you are essentially throwing away the money you are spending on your education by refusing to learn what it's trying to teach - that is, you are paying for a product that you don't want. That being said (who am I

Re: [go-nuts] Parsing time with timezones seem to fail

2023-02-09 Thread Ian Lance Taylor
On Thu, Feb 9, 2023 at 11:26 AM 'Thomas Casteleyn' via golang-nuts wrote: > > Hi, I originally asked on Gophers slack where they directed me to this group. > > It seems I'm not able to parse these 2 timestamps with timezone correctly: > https://go.dev/play/p/VZwD29701ps > > The responses show

[go-nuts] GO generics - function implementation

2023-02-09 Thread Stanimir Stankov
Need help! a function that allows you to group the elements of a slice based on a passed function that returns a key for each element of the slice func Partition[S any, K comparable](slice []S, fn func(S) K) map[K][]S { } a function that allows you to select elements from a slice based on a

[go-nuts] Parsing time with timezones seem to fail

2023-02-09 Thread 'Thomas Casteleyn' via golang-nuts
Hi, I originally asked on Gophers slack where they directed me to this group. It seems I'm not able to parse these 2 timestamps with timezone correctly: https://go.dev/play/p/VZwD29701ps The responses show confusing time formats and the playground even seems to be more wrong than on my local

[go-nuts] [security] Go 1.20.1 and Go 1.19.6 pre-announcement

2023-02-09 Thread announce
Hello gophers, We plan to issue Go 1.20.1 and Go 1.19.6 during US business hours on Tuesday, February 14. These minor releases include PRIVATE security fixes to the standard library. Following our security policy, this is the pre-announcement of those releases. Thanks, The Go team -- You

[go-nuts] Re: memory issues

2023-02-09 Thread jake...@gmail.com
What Marcello said! But also, the message mentions bad use of Unsafe.Pointer. You might want to look at uses in your app, and even third party libraries. See the documentation: https://pkg.go.dev/unsafe#Pointer - The rules must be followed to the letter! Are you using cgo? It also has very

[go-nuts] [security] golang.org/x/image/tiff fix pre-announcement

2023-02-09 Thread Roland Shoemaker
Hello gophers, We plan to issue a security fix for the golang.org/x/image/tiff package in the golang.org/x/image module on Tuesday, February 14th. Following our security policy, this is the pre-announcement of that fix. Cheers, Roland on behalf of the Go team -- You received this message

[go-nuts] Re: Go, VSCODE IDE, Delve debugger: am having problem debugging my console app

2023-02-09 Thread Daniel Jankins
Hi, I can not get the console app to run with the debugger. When I start the debugger I do not get the console display only Starting: C:\Users\djankins\go\bin\dlv.exe dap --listen=127.0.0.1:52239 from c:\Users\djankins\Repositories\UT\adpf-simulation\GUI DAP server listening at:

[go-nuts] SIGSEGV: segmentation violation on Linux/ARM with Microchip SAM9x60 (ARM926 core) processor

2023-02-09 Thread Jan Mercl
A user filled https://gitlab.com/cznic/sqlite/-/issues/132, but I'm not able to reproduce it on RPi 4 and I don't have access to the subj. chip/system. It might be possibly something HW related, IDK. Looking for expert advice for the linux/arm Go target. Anyone out there? Thanks in advance. -j

[go-nuts] Re: [golang-dev] Importing .xls and .xlsx files with golang.

2023-02-09 Thread fgergo
(golang-...@googlegroups.com is for developing the Go language (bcc-d), you'll want to use golang-nuts@googlegroups.com, now on cc.) If I understand correctly, you plan to parse excel files. I haven't tried these just yet, but maybe search on https://pkg.go.dev/search?q=xls best, fgergo On

[go-nuts] Re: memory issues

2023-02-09 Thread Marcello H
I would trim down the problem, by making a very small program that gets the XML file from a local disk and then just do the XSLT on it. That would give you less environment to oversee and debug. Perhaps then, make the xml as small as possible. Also mention which libs you use or make a playground