config

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBranch = "main"
View Source
const DefaultDepot = "import"

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchMapping

type BranchMapping struct {
	Name   string `yaml:"name"`   // Regex for branch
	Prefix string `yaml:"prefix"` // Prefix to prepend to matching branches
}

type Config

type Config struct {
	ImportDepot    string          `yaml:"import_depot"`
	ImportPath     string          `yaml:"import_path"`
	DefaultBranch  string          `yaml:"default_branch"`
	BranchMappings []BranchMapping `yaml:"branch_mappings"`
}

Config for gitp4transfer

func LoadConfigFile

func LoadConfigFile(filename string) (*Config, error)

LoadConfigFile - loads config file

func LoadConfigString

func LoadConfigString(content []byte) (*Config, error)

LoadConfigString - loads a string

func Unmarshal

func Unmarshal(config []byte) (*Config, error)

Unmarshal the config

Jump to

Keyboard shortcuts

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