ginsa

package module
v0.0.0-...-fed0734 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2016 License: MIT Imports: 11 Imported by: 0

README

Ginsa / 銀砂

Colorful diff for Zengin Codes.

screen shot

Install

You can download binary from releases page and place it in $PATH directory.

Usage

tags
$ ginsa tags

Show all tags of zengin-code/source-data.

diff
$ ginsa diff <tag>
# ex:
$ ginsa diff 2016-10-02

Show diff of the tag.

Author

Sho Kusano / @rosylilly

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VERSION  = "0.0.0"
	REVISION = "deadbeaf"
)

Functions

func FullVersion

func FullVersion() string

Types

type AddBankDiff

type AddBankDiff struct {
	Bank *Bank
}

func (*AddBankDiff) String

func (d *AddBankDiff) String() string

type AddBranchDiff

type AddBranchDiff struct {
	Branch *Branch
}

func (*AddBranchDiff) String

func (d *AddBranchDiff) String() string

type AllDiff

type AllDiff struct {
	NewBanks map[string]*Bank
	Banks    []Diff
	Branches map[string][]Diff
}

func DiffSourceData

func DiffSourceData(old *SourceData, now *SourceData) *AllDiff

func (*AllDiff) Out

func (a *AllDiff) Out()

type Bank

type Bank struct {
	Code string `json:"code"`
	Name string `json:"name"`
	Kana string `json:"kana"`
	Hira string `json:"hira"`
	Roma string `json:"roma"`
}

type Branch

type Branch struct {
	Code string `json:"code"`
	Name string `json:"name"`
	Kana string `json:"kana"`
	Hira string `json:"hira"`
	Roma string `json:"roma"`
}

type ChangeBankDiff

type ChangeBankDiff struct {
	OldBank *Bank
	NewBank *Bank
}

func (*ChangeBankDiff) String

func (d *ChangeBankDiff) String() string

type ChangeBranchDiff

type ChangeBranchDiff struct {
	OldBranch *Branch
	NewBranch *Branch
}

func (*ChangeBranchDiff) String

func (d *ChangeBranchDiff) String() string

type Diff

type Diff interface {
	String() string
}

func DiffBanks

func DiffBanks(old map[string]*Bank, now map[string]*Bank) []Diff

func DiffBranches

func DiffBranches(old map[string]*Branch, now map[string]*Branch) []Diff

type Object

type Object struct {
	Type string `json:"type"`
	SHA  string `json:"sha"`
	URL  string `json:"url"`
}

type Ref

type Ref struct {
	Ref    string `json:"ref"`
	URL    string `json:"url"`
	Object Object `json:"object"`
}

type RemoveBankDiff

type RemoveBankDiff struct {
	Bank *Bank
}

func (*RemoveBankDiff) String

func (d *RemoveBankDiff) String() string

type RemoveBranchDiff

type RemoveBranchDiff struct {
	Branch *Branch
}

func (*RemoveBranchDiff) String

func (d *RemoveBranchDiff) String() string

type SourceData

type SourceData struct {
	Tag string

	Banks    map[string]*Bank
	Branches map[string]map[string]*Branch
}

func FetchAllSourceData

func FetchAllSourceData() ([]*SourceData, error)

func (*SourceData) DownloadURL

func (s *SourceData) DownloadURL() string

func (*SourceData) Load

func (s *SourceData) Load() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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