codeowners

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package codeowners implements a lightweight CODEOWNERS file parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Owners

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

Owners maps file path patterns to their owners.

func Parse

func Parse(r io.Reader) *Owners

Parse reads a CODEOWNERS file and returns an Owners resolver. Lines starting with # are comments; blank lines are skipped. Each non-blank, non-comment line is: <pattern> <owner> [<owner> ...]

func (*Owners) Match

func (o *Owners) Match(filePath string) []string

Match returns the owners for the given file path. Returns nil if no rule matches.

Jump to

Keyboard shortcuts

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