I'm trying to debug the following build error in our CI where "A depends on B which can't build because it depends on C." I'm building my data service which doe
In Go, you can marshall a struct to XML, e.g.: package main import ( "encoding/xml" "fmt" ) type person struct { Name string Starsign str
I'm pretty new to Golang and I have an issue with adding items to Array. I use this link as a reference golang-book. I have this struct: package models type Fi
To my knowledge go distribution comes with some sort of package manager. After go 1.4.1 installation I've run go help in order to find any sub-command capable o
I'm trying to write a basic go program that calls a function on a different file, but a part of the same package. However, it returns: undefined: NewEmployee
Is there a way to download a large file using Go that will store the content directly into a file instead of storing it all in memory before writing it to a fil
Looking at the set up for go-vcr // Start our recorder r, err := recorder.New("fixtures/etcd") if err != nil { log.Fatal(err) } defer r.
I need to get the current time in different time-zones. Currently I know that we can do the following: t := time.Now() fmt.Println("Location:", t.Location(),
I'm wondering why fallthrough isn't allowed in a type switch statement in golang. According to the specification: "The "fallthrough" statement is not permitted
I am experimenting using Go to interact with a Database and am running into issues when dealing with Decimal fields. In this database most fields that are bas
Sometimes, it's convenient to combine two lists into a tuple using zip built-in function in Python. How to make this similarly in Go? For example: >>>
I've got a trouble with conditional compilation in Go 1. Here is my test code. Is there anything I misunderstand about the "// +build" constraint and the "-tag
Suppose I define the following gRPC service: service Library { rpc Search(SearchBookRequest) returns (stream SearchBookResponse) {} } message SearchBookReq
I have a time.Time value obtained from time.Now() and I want to get another time which is exactly 1 month ago. I know subtracting is possible with time.Sub()
Is there an established best practice for separating unit tests and integration tests in GoLang (testify)? I have a mix of unit tests (which do not rely on any
I'm facing an issue, am trying to run my go fiber project inside docker with air but am getting this erroruni-blog | /bin/sh: 1: /app/tmpmain.exe: not found am
I have two go programs. ProgA starts ProgB using cmd.Start(). From ProgA I try to kill ProgB, but ProgB shouldn't get killed immediately, it has to do some clea
calculate the sum of squares of given integers, excluding any negatives. The first line of the input will be an integer N (1 <= N <= 100), indicating the
Using gopkg.in/mgo.v2/bson, I wonder how to marshal an interface{} value into a value of type bson.Raw. The documentation for bson.Raw states: Using this t
I usually run go test ./... to run all tests in my project. How can I set up launch.json to debug every tests that normally go test ./... runs?