Skip to content

Instantly share code, notes, and snippets.


Maxim Bogdanov ravlio

  • Barcelona, Spain
View GitHub Profile
View rr_item_test.go
package rr_item_test
Example of round robin with elements of arbitrary types based of interface method `Value() interface{}` and also with Stringer.
import (
View flatten.go
package flatten_test
import (
// Golang has no multi-dimensional arrays, so I used a tree
type Node struct {
View Remove Doker images
# remove by tag (even with multiple tags per image)
docker rmi -f $(docker images -q %tag_name%|uniq)
# remove all
docker rmi -f $(docker images -q|uniq)
ravlio / main.go
Last active Jun 22, 2016
declarations and assignments of slices and maps
View main.go
package main
import "fmt"
var a []int
var b []int = []int{1, 2, 3}
var c map[string]int
var d map[string]*int = map[string]*int{"test":new(int)}
var e [4]int
var f map[string]int = map[string]int{}