Category "go"

Load data from reading files during startup and then process new files and clear old state from the map

I am working on a project where during startup I need to read certain files and store it in memory in a map and then periodically look for new files if there ar

How to download private repo from Dockerfile with bitbucket and golang project

I want download a private repository from bitbucket, but get some error fatal: could not read Username for 'https://bitbucket.org': terminal prompts disabled h

cloud build pass secret env to dockerfile

I am using google cloud build to build a docker image and deploy in cloud run. The module has dependencies on Github that are private. In the cloudbuild.yaml fi

Amazon SQS:: Got an error while trying to create queue: NoCredentialProviders: no valid providers in chain. Deprecated

I am trying to create Amazon SQS from my local machine and facing errors like Got an error while trying to create queue: NoCredentialProviders: no valid provide

Retrieval after serialization to disk using gob

I have been learning about databases and wanted to implement one as well for learning purposes and not for production. I have a defined schema: type Row struct

Go generics: invalid composite literal type T

package main import ( "google.golang.org/protobuf/proto" ) type NetMessage struct { Data []byte } type Route struct { } type AbstractParse interface

cannot infer V: infer type parameter from constraint implementation

I have an interface in go which wants to support saving and loading results in different databases and I want to support different types. package cfgStorage ty

Go create a mock for gcp compute sdk

I use the following function, and I need to raise the coverage of it (if possible to 100%), the problem is that typically I use interface to handle such cases i

How to configure Windows to allow Golang app to trust CA of self-signed cert

I have a 3rd party development tool that was written in Golang. My company uses Netskope which injects self-signed certificates in any SSL traffic from my machi

protoc --go_opt=paths=source_relative vs --go-grpc_opt=paths=source_relative

I am having a hard time figuring out protoc command and go plugin. What is the different between: protoc \ # Directory where you want the compiler to write y

Re-slicing slices in Golang

I recently picked up the Go language, and now I am confused with the following code: package main import "fmt" func main() { a := make([]int, 5) prin

Go command line wrapper with flexible output (stdout/file/network)

Below is a command line wrapper which can parse user input command line string to Go exec.Command(). Here is why I want to write a wrapper on it: exec.Command c

Is there any way to identify the current Encore app environment (local/test/production)?

I'm building an Encore app and am trying to define different behavior for my local and test environments in an easy way. I want to avoid triggering some actions

Reading from AWS S3 with Apache Beam Go SDK

We are using the Go SDK for building pipelines. I think Apache Beam already supports AWS S3 for Python and Java. Is there a plan to add it for the Go SDK?

should I still declare GOPATH?

I WAS reading Learning GO and suggest that needs to be declared on PATH GOPATH="/home/user/go". this is from author: it’s a good idea to explicitly defin

Fake client behaviour when mocking k8s for testing

I am using the fake clientset to perform some mocking in a k8s cli tool I am creating. Therefore I am creating a Job resource jobs := clientset.BatchV1().Jobs(m

Unable to find /oauth/device/code Auth0 Java API

Is there an API to fetch the device code via Auth0 Java API, we use the following snippet in Go, the question is if there is a standard API or should we make a

Go gorilla websocket write deadline

I am unable to understand this part of the code which uses c.conn.SetWriteDeadline function. // Time allowed to write a message to the peer. writeWait

Terraform Custom Provider - Data Source Schema

I am working on creating a custom terraform provider by using terraform sdk. I am trying to read data from the existing API GET call. I am finding it difficult

I'm testing with go openAPI

I'm testing with OpenApi and as an example with https://github.com/d-vignesh/Todo-App-with-OpenAPI but if i run this, i get the following error: .\main.go:9:77: