config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStringReadCloser

func NewStringReadCloser(s string) io.ReadCloser

NewStringReadCloser creates a new io.ReadCloser from a string

Types

type C

type C struct {
	Jira   Jira   `yaml:"jira"`
	Gitlab Gitlab `yaml:"gitlab"`
	// contains filtered or unexported fields
}

func New

func New() (*C, error)

New config

func (*C) Decode

func (c *C) Decode(f io.Reader) error

Decode a io.Reader and load into the config

func (*C) Encode

func (c *C) Encode() error

func (*C) EncodeString

func (c *C) EncodeString() (string, error)

EncodeString the config and output a string

func (*C) InitDefault

func (c *C) InitDefault() error

InitDefault writes the default configuration to the default configuration path.

func (*C) Load

func (c *C) Load() error

Load loads the config

func (*C) Path

func (c *C) Path() (string, error)

Path returns the filepath to the configuration file

type Gitlab

type Gitlab struct {
	Reviewers []string `yaml:"reviewers,omitempty"`
}

type Jira

type Jira struct {
	TicketQuery string `yaml:"ticket_query,omitempty"`
}

type StringReadCloser

type StringReadCloser struct {
	*strings.Reader
}

StringReadCloser wraps a strings.Reader to implement io.ReadCloser

func (*StringReadCloser) Close

func (src *StringReadCloser) Close() error

Close implements io.Closer interface

Jump to

Keyboard shortcuts

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