gitignore

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package gitignore provides helpers for maintaining .gitignore entries managed by melon. All functions are idempotent and safe to call repeatedly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsEntry

func ContainsEntry(path, entry string) (bool, error)

ContainsEntry reports whether path contains a line matching entry (trimmed). Returns false if the file does not exist.

func EnsureEntries

func EnsureEntries(path string, entries []string) (added []string, err error)

EnsureEntries reads the .gitignore at path (creating it if absent), appends any entries from the provided list that are not already present, and writes the result back. It returns the slice of entries that were newly added.

func RemoveEntries

func RemoveEntries(path string, entries []string) error

RemoveEntries removes lines matching any entry in entries from the .gitignore at path. Lines are matched by trimmed value. Missing file is silently ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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