mark

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mark maintains a delimited block inside a file whose other lines belong to someone else: a project's .env, a repository's info/exclude. The markers are what make the block recognisable, so a rewrite replaces it instead of piling copies up.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Start string
	End   string
}

func (Block) Rewrite

func (b Block) Rewrite(content string, lines []string) string

Rewrite returns content with the block, and it alone, carrying lines. The block goes last: whatever else the file holds keeps its place and its order.

func (Block) Strip

func (b Block) Strip(content string) string

Strip removes a block written earlier. A file holding the opening marker alone is left as it is: cutting from there to the end would take content the block never owned.

Jump to

Keyboard shortcuts

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