repos

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareByID

func CompareByID(a, b *github.Repository) bool

func MarshalID

func MarshalID(repo *github.Repository, fields []string) (output.Record, error)

Types

type CompareFunc

type CompareFunc func(a, b *github.Repository) bool
var DefaultCompareFunc CompareFunc = CompareByID

type List

type List struct {
	Repos   []*github.Repository
	Compare CompareFunc
	Marshal MarshalFunc
}

This type represents a sortable collection of repositories

func NewList

func NewList() *List

func (*List) Add

func (l *List) Add(repos ...*github.Repository)

Append repos... to the list

func (*List) Len

func (l *List) Len() int

func (*List) Less

func (l *List) Less(i, j int) bool

func (*List) Records

func (l *List) Records(fields []string) ([]output.Record, error)

func (*List) Sort

func (l *List) Sort()

Sort data in-place

func (*List) SortReverse

func (l *List) SortReverse()

Sort data in-place in reverse order

func (*List) Swap

func (l *List) Swap(i, j int)

type MarshalFunc

type MarshalFunc func(repo *github.Repository, fields []string) (output.Record, error)
var DefaultMarshalFunc MarshalFunc = MarshalID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL