config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config defines the format of the configuration file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Match      string `yaml:"match"`
	EMail      string `yaml:"email"`
	Keyname    string `json:"keyname"`
	SigningKey string `json:"signingkey"`
	CommitOpts string `json:"commit-opts"`
}

Config defines each entry for the File matching a remote and containing a configuration to apply for the repo

type File

type File []Config

File holds a list of Config entries

func Load

func Load(fn string) (f File, err error)

Load reads the configuration file and parses it

func (File) ConfigForRemote

func (f File) ConfigForRemote(remote string) *Config

ConfigForRemote returns the first Config matching the given remote or nil if none matched

Jump to

Keyboard shortcuts

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