background preloader

Golang

Facebook Twitter

The StableLib Tool - StableLib. StableLib Tool is currently in development and will be available in Q3 2015. All packages will always be compatible with the standard go get tool, so please use go get to install and update them. StableLib subscription comes with the stablelib command-line tool which simplifies management of Go packages from our collection. (Its use is optional, you can also use the standard go get tool to access our library of packages.)

Fetch and install packages stablelib install v1/crypto/siphash StableLib command-line utility fetches the specified package from our CDN and installs it. You can also install the whole library of packages with a single command. go get -u stablelib.com/v1/crypto/siphash Alternatively, you can use the familiar go get to install packages from StableLib. Use packages package main import ( "fmt" "stablelib.com/v1/crypto/siphash" ) ... Packages from StableLib are normal Go packages, use them as you would use any other package. Upgrade packages stablelib upgrade v1/crypto/siphash. Go-bootstrap: Generates a lean and mean Go web project. Boltdb/bolt · GitHub. Tour.golang exercise solutions. b3log/wide · GitHub. Go development environment for Vim - The Gopher Academy Blog. By Fatih Arslan 29 March 2014 The reason for creating vim-go Go has a very versatile toolchain and commands that makes Go programming fun.

One of the famous tools is gofmt, which automatically reformats the code according to some predefined rules. However there are many other tools like goimports, oracle, godef, etc.. which help to provide a more productive workflow. There are many independent vim plugins that integrate these tools into Vim. We also have the offical Vim plugins that provides some basic Go support for Vim. Gofmt destroy the undo history and it's impossible to do undo on your code Building, running or testing are not integrated, all of these needs additional settings.

The main reason to create vim-go was to integrate all these plugins, fix the flaws and provide a common and seamless experience. Vim-go features vim-go improves and supports the following features: Installation vim-go is a pathogen compatible bundle. Development with vim-go Godoc can be called on any identifier. Building Web Apps with Go. Vim for Golang :: Metal3d. Developping with Go is easy, a simple text editor and you're ready to work. But it's very confortable to have syntax highlight, checker and outline view. There are lot of possible configurations for a lot of editors. My preference is Vim + some plugins. Let me show you how I configured my "Go vim IDE" At first, be sure you've installed a recent Go implementation. I'm working on Fedora (18) with a vim version 7.3. What we will do: install pathogen (or Vundle)install syntasticinstall gocodeinstall tagbar + configurationinstall nerdtree (optional) Pathogen Pathogen is like Vundle, it allows you to install plugins inside a deported directory that is easier to manage.

Mkdir -p ~/.vim/autoload ~/.vim/bundle; \ curl -Sso ~/.vim/autoload/pathogen.vim \ Then, in your ~/.vimrc, append this line before any "filetype" directive or "syntax": execute pathogen#infect() You'll see my own vimrc plugin at the end of post. Syntastic That's all. The Revel Web Framework for Go. Get Your Development Team Started With Go. June 30, 2014 · 5 Comments Here at DigitalOcean, Go is quickly becoming one of our favorite programming languages. After a few internal debates, I’ve distilled a few thoughts that I'd like to share with teams new to Go (or thinking of taking it on in the future). Using External Code The Go package landscape is growing every day. People are sharing high quality code that prevents you from having to reinvent the wheel.

There are packages that help you with tasks that range from implementing complex algorithms and building networking services to interfacing with other low level systems through the Go C bindings. Given what's available, it's still a challenge to locate high quality packages to help you build your projects. There are also a few package repositories that exist; however, none of them can be considered a standard. While this remains an unsolved issue, Go has a secret weapon: Integrating With External Code Using Go's powerful interfaces, you start specifying the behavior you desire: Google/cayley. Why Go Is Not Good :: Will Yager. Blog I like Go. I use it for a number of things (including this blog). Go is useful. With that said, Go is not a good language. We have to be careful using languages that aren't good, because if we're not careful, we might end up stuck using them for the next 20 years.

This is a list of my chief complaints about Go. I've also included some comparisons to both Rust and Haskell (which I consider to be good languages). Generic Programming The Problem We want to write code that we can use for lots of different things. A Good Solution: Constraint Based Generics and Parametric Polymorphism I think the best generic programming system we have right now is what both Rust and Haskell use.

(Rust, version 0.11) fn id<T>(item: T) -> T { item } (Haskell) id :: t -> t id a = a For this toy example, we've defined a generic function id, which takes some thing and returns that same thing. We can also use this to make generic data structures. (Rust) data Stack t = Stack [t] Go's Solution: interface{} (Go) (Java)