config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config handles configuration and command line argument parsing for ghprmerge.

Index

Constants

This section is empty.

Variables

View Source
var ErrHelp = flag.ErrHelp

ErrHelp is returned when -help or -h is passed.

View Source
var ErrVersion = errors.New("version requested")

ErrVersion is returned when --version is passed.

Functions

This section is empty.

Types

type Config

type Config struct {
	Org          string
	SourceBranch string
	Rebase       bool
	Merge        bool
	SkipRebase   bool
	Repos        []string
	RepoLimit    int
	JSON         bool
	Confirm      bool
	Quiet        bool
	Token        string
}

Config holds all configuration for ghprmerge.

func ParseFlags

func ParseFlags(args []string, version string) (*Config, error)

ParseFlags parses command-line flags and environment variables.

func (*Config) IsAnalysisOnly

func (c *Config) IsAnalysisOnly() bool

IsAnalysisOnly returns true if neither --rebase nor --merge is set.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks that all required configuration is present.

type StringSliceFlag

type StringSliceFlag []string

StringSliceFlag is a custom flag type that collects multiple string values.

func (*StringSliceFlag) Set

func (s *StringSliceFlag) Set(value string) error

func (*StringSliceFlag) String

func (s *StringSliceFlag) String() string

Jump to

Keyboard shortcuts

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