How to override dependency used by go standard project(s) which is used in my go project
I have situation where I have some vulnerabilities due to old dependencies used by the standard libraries , which are used in my project.
How to override dependency used by go standard project(s) which is used in my go project?
Why do some fields in the Go structs generated using cgo become private?
enter image description here
The blue box is my C struct, and the red box is the Go struct generated by cgo.
Does the Go runtime guarantee that there are at least as many OS Threads as there are Contexts (P)?
can someone confirm something for me; Does the Go runtime guarantee that there are at least as many OS Threads as there are Contexts (P)? That is, if, for example, GOMAXPROCS is equal to 5, will there be at least 5 OS Threads?
Golang alternative to Pythons pprint.pformat
I am rewriting a Python CLI in Golang due to a network effect I want to utilize. One of the challenges I am facing is that I can’t seem to find a replacement for Pythons pprint.pformat.
Robfig cron retry
If the cron job fails, is there a feature in robfig cron scheduler to retry a certain number of times?
How to Set Up and Evaluate a go-cel Expression with Protocol Buffers in Go
I am trying to set up a go-cel environment and evaluate an expression using Protocol Buffers in Go. I have the following code. However, I am encountering issues with setting up the environment and evaluating the expression. Specifically, I am getting errors during the environment creation, compilation, or evaluation steps.
Subrouting using net/http in golang 1.22, issue with trailing “/” redirection
I am using the net/http
standard library package for subrouting in Golang while developing a simple API. However, I encountered a problem. I have user routes for registration with POST /v1/users/
. When I try to send a request to POST /v1/users
, I get a 404 page not found
error. I need to add a trailing /
to make it work. I believe it should work with both trailing /
and without trailing /
. If you can help me fix this, it would be great.
What is a use case for public fields on privat structs in Go
Let’s assume the following private struct:
exec.Command hangs when next scripts are having nohup command to start the services
Using the following code to run the given commands or scripts:
Can’t use Color array as color.Palette value in argument to image.NewPaletted
I’m currently trying to create an image with a palette read from the first row of a png file that has known dimensions. I’m doing this by declaring a Color
array with a known size, then setting the entries in that array individually, then passing that array into image.NewPaletted
as the palette argument. I know the following works from the example in Donovan & Kernighan: