Skip to main content
Code Review

Questions tagged [go]

Go, commonly referred to as "golang", is a fast, statically typed, compiled language created by Google. The language was initially developed as an alternative to C++ for server infrastructure and has native support for concurrency.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
85 views

How to structure payment system code in golang? [closed]

sorry for my English. I create paysystem. I want to structure the project based on https://github.com/golang-standards/project-layout. I would also like to hear general comments on the code. Thank you ...
5 votes
2 answers
128 views

Command-line Tool That Reads a Text File and Calculates Basic Statistics

TLDR: First time dev in Go moving from Java and I need feedback on my simple CLI Tool. I wanted to get competent in Go as a very junior developer, so this is my first basic project in go. I set a goal ...
7 votes
3 answers
1k views

C++ implementation of Go inspired cancellable context

I am trying to create golang inspired cancellable context in C++ for use in worker threads and other tasks. I have tried to avoid using raw pointers, but ever since I started writing C++ code, I ...
5 votes
1 answer
129 views

Default methods for embedded structs

I am learning Go by working through programming puzzles. There is shared boilerplate between puzzles that I want to factor out into into some kind of helper structure: Read the input (always the same,...
1 vote
0 answers
76 views

Generic sync.Map in Go

In one of our projects it became rather painful to use the Go standard library's sync.Map as it lacks type safety, i.e. it became rather tedious to do and check ...
Runxi Yu's user avatar
  • 119
4 votes
1 answer
106 views

Golang application: TCP listener to receive in HL7 messages

I wrote a small (~350 lines) golang application mainly for fun to explore the language. I was wondering what the standard layout of a little testing tool like this would be from a seasoned golang dev. ...
btolsen131's user avatar
4 votes
1 answer
100 views

Go Program for Concurrent FHIR Resource Uploads – Does it Achieve True Concurrent Requests?

I’ve developed a Go program to benchmark a FHIR server by uploading a dataset of FHIR resources concurrently. The goal is to stress-test the server by sending a specified number (...
1 vote
1 answer
230 views

golang - Kth largest element in an array using quick select - time limit exceeded issue

I am trying to solve the following problem in leetcode. https://leetcode.com/problems/kth-largest-element-in-an-array/description Given an integer array \$nums\$ and an integer \$k\,ドル return the \$k^\...
3 votes
2 answers
207 views

Data pipeline that handles errors and cancellations

I have code that concurrently reads data from a stream, processes elements, and writes the data to another stream. Each of these individual operations may fail, in which case I want processing to halt ...
2 votes
2 answers
122 views

Handling lock release in a goroutine with timeout

I have a scenario where I need to acquire lock on a resource inside a goroutine and release the lock (only once) after a timeout or when the goroutine is done with it's job. I came up with a way to ...
Ram Dittakavi's user avatar
1 vote
1 answer
55 views

Distributed locking with fencing token implementation in Golang

I was reading about the implementation of distributed locks where we need to verify the lease using a fencing token as per this article - https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-...
1 vote
1 answer
138 views

Bird struct and other type of birds

I am learning Go and trying to write a Bird design in Go. Here is the code. How can I improve it? bird/bird.go ...
coder's user avatar
  • 2,471
4 votes
2 answers
207 views

Golang Optimize Unzipping FiIes

I have been working on optimizing some code I use for compressing images and linting content in epub files. I originally used cli utilities to help get the job done before moving to using Go code as ...
user avatar
Peter Kaufman
5 votes
1 answer
271 views

String character changes (case insensitive) - Go

I saw this question on one of the socials, presented as an Apple interview question. I have had to paraphrase as it was not given in text format. (Credit: Instagram @greghogg5) Given a string (S) ...
2 votes
1 answer
74 views

Application that interacts with a remote GitHub repository with retries

I came up with the logic for an app that talks to a remote GitHub repository using below. I tried to stick to Go best practices and approaches, but would like to identify bottlenecks and adopt better ...
Inian's user avatar
  • 181

15 30 50 per page
1
2 3 4 5
...
39

AltStyle によって変換されたページ (->オリジナル) /