config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//APPLY apply constant
	APPLY = "apply"
	//REMOVE remove constant
	REMOVE = "remove"
)

Variables

This section is empty.

Functions

func Contains

func Contains(arr []Repo, item Repo) bool

Contains check if array contains repo

func IndexOf

func IndexOf(arr []Repo, item Repo) int

IndexOf repo in array

func Mapkeys

func Mapkeys(m map[string]string, value string) []string

Mapkeys get keys by value

func Write

func Write(config SaneConfig)

Write the config

Types

type Repo

type Repo struct {
	User   string   `json:"user"`
	Name   string   `json:"name"`
	Branch string   `json:"branch"`
	Tag    string   `json:"tag"`
	Topics []string `json:"topics"`
}

Repo sane repo

type SaneConfig

type SaneConfig struct {
	Repos   []Repo            `json:"repos"`
	Aliases map[string]string `json:"aliases"`
}

SaneConfig config for sane

func Read

func Read() SaneConfig

Read the config

Jump to

Keyboard shortcuts

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