Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
17 views

Kindly review my Go logging package

Feel free to go get the package at: bitbucket.org/agallego/log or browse the code online. Thanks for the code review.
4
votes
0answers
22 views

Concurrency limit map in Go

Please someone who knows locks, mutexes, and Go, review the following code. Task: per host concurrency limits for web crawler (map[string]Semaphore). I considered chan struct{} (chan bool) approach, ...
1
vote
0answers
21 views

Effectively convert little endian byte slice to int32

I have a data stream of bytes and I'd like to get a little endian encoded int32 from four bytes. Is there a better way than to do this like the following code? package main func read_int32(data ...
7
votes
1answer
77 views

Creating random maze in Go

/* Create a random maze */ package main import ( "fmt" "math/rand" "time" ) const ( mazewidth = 15 mazeheight = 15 ) type room struct { x, y int } func (r room) ...
3
votes
1answer
43 views

Rot13 Reader in go

For this exercise I have done this; func between(start, end, value byte) bool{ if value > end { return false } else if value < start { return false } return true ...
1
vote
1answer
58 views

Comparing two images

I have some code in Go that is attempting to compare two images and determine how different they are. The method is fairly crude, but it is fast enough. Basically it just compares both images pixel by ...
2
votes
1answer
194 views

code review for count then sort problems (go lang)

the question is simple, for a input [apple, banana, orange, apple, banana, apple], the program will count it as a map: {apple : 3, orange: 1, banana: 2}, then sort this map by it's values, get ...
4
votes
1answer
161 views

Improve performance of function

I've got a simple programm written in Golang that takes a map as input and tries to solve the travelling salesman problem by using a genetic algorithm. My Crossover method is a real performance killer ...
1
vote
0answers
144 views

Is there a better solution to this Fibonacci implementation in Go?

At the end of the Day 1 Go Course slides (pdf) there is an exercise stated as follows: You all know what the Fibonacci series is. Write a package to implement it. There should be a function to get ...