operations

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package operations provides functionality for generating, managing, and resolving filesystem operations in the dodot system.

This package handles the conversion of high-level actions into concrete filesystem operations, along with conflict detection and resolution. The operations package is responsible for:

  • Operation generation from actions
  • Conflict detection and resolution between operations
  • Operation deduplication and optimization
  • Utility functions for operation management

The package implements the operation layer of the dodot pipeline, sitting between action generation and filesystem execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreOperationsCompatible

func AreOperationsCompatible(ops []*types.Operation) bool

AreOperationsCompatible checks if a set of operations can coexist without conflicts

func DeduplicateOperations

func DeduplicateOperations(ops []types.Operation) []types.Operation

DeduplicateOperations removes duplicate operations from a slice Operations are considered duplicates if they have the same type and target

func ExpandHome

func ExpandHome(path string) string

ExpandHome expands the home directory in a path

func ResolveConflicts

func ResolveConflicts(operations *[]types.Operation, ctx ForceChecker)

ResolveConflicts checks for and marks conflicting operations It handles both filesystem conflicts and internal operation conflicts

func ResolveOperationConflicts

func ResolveOperationConflicts(operations *[]types.Operation, ctx ForceChecker)

ResolveOperationConflicts is an alternative conflict resolution implementation It checks for both internal conflicts between operations and filesystem conflicts

func Uint32Ptr

func Uint32Ptr(v uint32) *uint32

Uint32Ptr returns a pointer to a uint32 value

Types

type ForceChecker

type ForceChecker interface {
	IsForce() bool
}

ForceChecker defines a minimal interface for checking force mode

Jump to

Keyboard shortcuts

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