dependency

package
v0.4.22 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDependencyExists = fmt.Errorf("dependency already exists")

ErrDependencyExists is returned when trying to add a dependency that already exists.

Functions

func GetDependencies

func GetDependencies(database *db.DB, issueID string) ([]models.Issue, error)

GetDependencies returns issues that issueID depends on.

func GetDependents

func GetDependents(database *db.DB, issueID string) ([]models.Issue, error)

GetDependents returns issues that depend on issueID.

func GetTransitiveBlocked

func GetTransitiveBlocked(database *db.DB, issueID string, visited map[string]bool) []string

GetTransitiveBlocked returns all issues transitively blocked by issueID.

func Remove

func Remove(database *db.DB, issueID, dependsOnID string) error

Remove removes a dependency between two issues.

func ValidateAndAdd

func ValidateAndAdd(database *db.DB, issueID, dependsOnID string) error

ValidateAndAdd validates the dependency (no cycles, both issues exist, not duplicate) and adds it. Returns nil on success, or an error describing what went wrong.

func WouldCreateCycle

func WouldCreateCycle(database *db.DB, issueID, dependsOnID string) bool

WouldCreateCycle checks if adding a dependency from issueID to dependsOnID would create a cycle. Returns true if adding the dependency would create a circular dependency.

Types

This section is empty.

Jump to

Keyboard shortcuts

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