names

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package names holds the default Docker Compose file names as a leaf package, shared by the Compose parser and the analyzer's classifier (which sit on opposite sides of an import cycle through pkg/parser/yaml), so both agree on which files are base files and which are auto-merged overrides.

Index

Constants

This section is empty.

Variables

View Source
var FileNames = []string{"compose.yaml", "compose.yml", "docker-compose.yaml", "docker-compose.yml"}

FileNames are the default base file names Compose looks for.

View Source
var OverrideFileNames = []string{
	"compose.override.yaml", "compose.override.yml",
	"docker-compose.override.yaml", "docker-compose.override.yml",
}

OverrideFileNames are the default override file names Compose merges into the base file when no -f flags are given.

Functions

func IsDefaultBaseFileName

func IsDefaultBaseFileName(path string) bool

IsDefaultBaseFileName reports whether path is one of the default Compose base file names (the only files an override file is auto-merged into).

func IsOverrideFileName

func IsOverrideFileName(path string) bool

IsOverrideFileName reports whether path is one of the default Compose override file names. These files are merged into their base file at parse time and must not be classified/scanned standalone (they would duplicate findings with wrong attribution).

func OverrideNameFor

func OverrideNameFor(path string) string

OverrideNameFor returns the default override file name paired with the given path ("", when path is not a default base file name). Compose merges each base only with its own override variant: compose.yaml with compose.override.yaml, docker-compose.yaml with docker-compose.override.yaml — never across variants.

Types

This section is empty.

Jump to

Keyboard shortcuts

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