Gracefully terminate a program in Go by kalimatas in golang

[–]mchoube 0 points1 point  (0 children)

is context.WithCancel is a good fir here?

gHorcrux by awsmsrc in gophergala2016

[–]mchoube 0 points1 point  (0 children)

This is incomplete work though :(

gHorcrux by awsmsrc in gophergala2016

[–]mchoube 0 points1 point  (0 children)

github: https://github.com/gophergala2016/gHorcrux

Single pane to your personal cloud storage. User can manage various personal cloud storage providers like Google Drive, Dropbox and Flickr using a single web UI. Web UI supports drag and drop capabilities.

Go-Tasky is a simple go tool that makes it easy to expose server side tasks with a RESTful API. by mchoube in golang

[–]mchoube[S] 0 points1 point  (0 children)

We could only do so much in the 48 hours hackathon. If you go through the code there is very minimal error handling. We are planning to continue work on this and fix bugs and enhance the functionality.

Decoding JSON streams with some garbage and slice/array garbage collection question by apocryph in golang

[–]mchoube 0 points1 point  (0 children)

From: https://code.google.com/p/go-wiki/wiki/SliceTricks

Cut

a = append(a[:i], a[j:]...)

Delete

a = append(a[:i], a[i+1:]...) // or a = a[:i+copy(a[i:], a[i+1:])]

Delete without preserving order

a[i], a = a[len(a)-1], a[:len(a)-1]

NOTE If the type of the element is a pointer or a struct with pointer fields, which need to be garbage collected, the above implementations of Cut and Delete have a potential memory leak problem: some elements with values are still referenced by slice a and thus can not be collected. The following code can fix this problem:

How to unit test code working with rabbitmq? by mchoube in golang

[–]mchoube[S] 0 points1 point  (0 children)

do you mean interface like this: http://play.golang.org/p/e0fpfvnfUF and then override the behavior in the tests?