extends

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package extends handles profile inheritance and dotenv file references. It parses and validates extend directives that link profiles and environment files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extend

type Extend string

Extend represents an extension entry that can reference profiles or dotenv files.

const (
	// Profile is an extend entry for a profile.
	Profile Extend = "profile"
	// DotEnv is an extend entry for a dotenv file.
	DotEnv Extend = "dotenv"
	// Invalid is an extend entry for an invalid type.
	Invalid Extend = "invalid"
)

func ToType

func ToType(e []string, t Extend) []Extend

ToType converts a slice of strings to Extend entries with the specified type prefix.

func (Extend) Path

func (e Extend) Path() string

Path strips the type prefix from the extend entry.

func (Extend) Type

func (e Extend) Type() Extend

Type returns the type of the extend entry.

type Extends

type Extends []Extend

Extends represents a slice of extension entries.

func (*Extends) Resolve

func (es *Extends) Resolve() error

Resolve expands glob patterns in dotenv extends and resolves all entries.

func (*Extends) Valid

func (es *Extends) Valid() error

Valid checks if all extend entries are valid.

Jump to

Keyboard shortcuts

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