Skip to content

rafecolton/go-dockerclient-sort

Repository files navigation

go-dockerclient-sort

Build Status Build Status GoDoc Coverage Status

For sorting the results of Docker API calls made using https://github.com/fsouza/go-dockerclient

Example usage:

package main

import(
	"fmt"

	"github.com/fsouza/go-dockerclient"
	"github.com/rafecolton/go-dockerclient-sort"
)

func main() {
	var endpoint = "unix:///var/run/docker.sock"
	var client, _ = docker.NewClient(endpoint)

	images, _ := client.ListImages(false)
	sort.Sort(dockersort.ByCreatedDescending(images))
	fmt.Printf("sorted images: %+v\n", images)
}

About

For sorting the results of Docker API calls made using https://github.com/fsouza/go-dockerclient

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages