Technologies

Using Google Cloud storage with AWS libraries in GO LANG

Using Google Cloud storage with AWS libraries in GO LANG

Google Cloud storage  it’s Google answer to [Amazon S3][1] service. As long one of them is very popular 😉 Second wasn’t so successful amongst developers due to quite complex processes around service. Amazon is super simple, and developer friendly – Google… well not so easy. So the questions – why you may consider using GS instead of well documented, and super easy S3. Not many people realise but Google Cloud Storage is actually cheaper . The other reason to use Google Storage is having different provider as a backup solution. Anyway – let’s show how easy is to use GS with existing S3 libraries.

How update Go library

How update Go library

Installation of go library is pretty simple: go get github.com/garyburd/redigo/redis

From time to time, you want to get fresh version of it. If you run that command again it will NOT update the library – because it’s already there. To update it you need to use the -u switch:

go get -u github.com/garyburd/redigo/redis

What about angular alternatives

What about angular alternatives

It’s my third post in “alternatives” series – this time i looked for something nicer then Angular . Apparently Angular went the same path like all good and slim solutions. It’s getting slower and bigger. With this type of framework we have at least couple of options:

Fetch page with proxy using The Go language

Fetch page with proxy using The Go language

For a while i’m playing with The Go Programming Language – so far I loved it. I figure out that I’ll push some code snippets from time to time.
Today I spend some time creating simple not ever crawler, but website fetcher.

Idea is very simple – download page, run xpath query on it and spit out results. I was looking for decent xpath library for Go and couldn’t find any. I tried to use xmlpath but it sucks. I couldn’t even run queries like id('product-details')/div[@class='product-price']" Then I found something nicer – Gokogiri – which works pretty nicely, but – couldn’t find any examples except this small article .

The only problem with running Gokogiri is that it uses libxml2 which is not a huge problem on Linux based systems, but on Mac OS X you have to install it via homebrew
brew install libxml2