Popular Categories
0 0

Regular readers of my blog will all be aware that in Go a string is in fact a struct with a pointer to an area of memory containing the byte content of the string and an integer Len that tells you… ..

2 weeks ago
9
Comments Off on The why of Go strings – Phil Pearl – Medium
0 0

I created this basic structure (https://github.com/cweiser22/apistructure) for my backend projects. I was wondering if anyone has any criticisms or recommendations. submitted by /u/AmateurLlama [link] ..

2 weeks ago
17
Comments Off on Is this a good project structure for my APIs?
0 0

2 result sets unrelated to each other, therefore a join can’t be used. ​ How to retrieve those using a single request to a db? submitted by /u/bibat003 [link] [comments]

2 weeks ago
20
Comments Off on How to retrieve 2 SQL result sets?
0 0

I have a server that executes requests using worker queues and all these requests are made to mongoDB for either insertion or deletion. I want to see an example of how I can use context cancellation with ..

2 weeks ago
14
Comments Off on Examples for using context cancellation with rabbitmq
0 0

In today’s article, we will talk about the Extract Interface refactoring, a new refactoring available since GoLand 2019.1. This refactoring allows us to take a type and extract all the method definitions ..

2 weeks ago
16
Comments Off on Refactorings in GoLand – Extract Interface
0 0

Hello. ​ I have 10+ years of IT experience. Mostly devops/sysadmin/coding/lead roles. I typically use: shell->python->golang to solve problems. While applying for jobs it seems a lot of companies ..

2 weeks ago
18
Comments Off on Interview Coding Test w/o golang
0 0

https://github.com/pwaller/go2ll-talk ​ can’t wait for this `go2ll` tool to be made public! ​ based off: https://github.com/llir/llvm submitted by /u/sbinet [link] [comments]

2 weeks ago
18
Comments Off on (pure) Go to LLVM (toy) compiler
0 0

A while ago Go team launched a style guide for new design with presentation deck and new logo. Any any when that will be implemented in website? submitted by /u/Mittalmailbox [link] [comments]

2 weeks ago
15
Comments Off on Any update on Go website redesign?
0 0

I have observed this in several standard Golang packages and wonder if it has a purposeful significance. The code of an exported function is written in a separate non-exported function of the same name ..

2 weeks ago
15
Comments Off on Indirect implementation of exported functions
0 0

Hello Guys, ​ In my company we start thinking about using modules instead of GOPATH, our main source of headache is how to manage internal dependencies. For instance, we have some imports that look ..

2 weeks ago
16
Comments Off on Transition from GOPATH to GOMODULES in company projects
0 0

https://medium.com/@drodil/first-dive-into-go-21d7e61024bc submitted by /u/drodil [link] [comments]

2 weeks ago
22
Comments Off on First dive into Go
0 0

So the other day, I encountered an issue where Package A depends on an interface in Package B and vice versa. I made Package B to not depend on Package A anymore. But this reminded me of how AWS Golang ..

2 weeks ago
24
Comments Off on Moving interface into a separate package
0 0

A simple example of an building optimised go + postgres container _ image. I struggled with this a bit so I thought it may be helpful for someone else! Any constructive criticism welcomed. dockerised go + postgres ..

2 weeks ago
71
Comments Off on Dockerised go + postgres example

Goose migration

Written by
0 0

I am a beginner in golang and db migration I works on web based open source program that use golang and this program use mvc structure. However, i am trying to add some features which are aslo require ..

2 weeks ago
80
Comments Off on Goose migration
0 0

Hello folks ! I’m currently trying to implement a way for a GO program to call some existing C functions (which are a part of another already existing independent code). However, the C code uses, ..

2 weeks ago
76
Comments Off on Using C libraries in Go
0 0

When writing unit tests where I mock out functions, what is the benefit of passing gomock.AssignableToType() vs gomock.Any(). It seems like your call on your mock object would fail if type wasn’t ..

2 weeks ago
88
Comments Off on gomock.Any() vs gomock.AssignableToType()
0 0

I want to persist the state of my structs for later use. My structs might include transient dependencies, such as fields which might hold connections e.g. *sql.DB. Therefore, these special fields, can’t ..

2 weeks ago
86
Comments Off on Dependency aware encoder/decoder
0 0

There are a lot of discussion about frontend for golang. Golang has a solid Template Engine for “Server-side rendering” html pages and i want to use this Template package to create the UI Website. ..

2 weeks ago
72
Comments Off on frontend for golang – seperated or nested?
0 0

I have a barcode thingy, the main looks like this: ($GOPATH/src/gitlab.com/something/barcode/cmd/barcode/main.go)package mainimport ("gitlab.com/something/barcode/pkg/cmd")func main() {cmd.Execute()} So i want ..

2 weeks ago
46
Comments Off on Import local packages
0 0

I have inserted data into mongodb in the following way { "_id" : ObjectId("5c80e9cc3bf127cfc80ba5dc"), "resp" : [ { "name" : "by", "gender" : "synced", "age" : "response", "hobby" : "submitted", "mobile" ..

2 weeks ago
49
Comments Off on How to query data in mongo?
0 0

Given n number of text files as input, generate an output file with the details of unique words and its occurrence in all the files. (You’ll have to process all the files concurrently) Sample Input: ..

2 weeks ago
44
Comments Off on I am currently working on this prblem and i am stuck with reading both the file Concurrently. Guys,please help me out!!(Ps: Noob at Golang)
0 0

Hello! I’m writing a small program that aims to provide a way of executing small script functions over the Internet. However I’m not able to write the command so that it may perform a function ..

2 weeks ago
50
Comments Off on Execute bash function from go?