defaults

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package defaults provides types and functions to work with configuration of the default branch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config represents configuration of the default branch.

Config keeps the name of the branch that the linter treats as the main branch of the repository.

func NewConfig

func NewConfig(opts ...Option) Config

NewConfig creates a new Config instance with provided functional options to customize the configuration.

Without options the created Config has an empty default branch name.

func (Config) Name

func (c Config) Name() string

Name returns the name of the default branch.

type Option

type Option func(*Config)

Option configures a Config instance.

Option is a functional option accepted by NewConfig to customize the created configuration.

func WithName

func WithName(name string) Option

WithName sets the name of the default branch.

Jump to

Keyboard shortcuts

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