util

package
v0.29.0 Latest Latest
Warning

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

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

Documentation

Overview

Package util provides general filesystem, git, markdown, and execution helpers for magefiles.

Index

Constants

View Source
const GeneratedBanner = "<!-- Page generated by Cargoship; DO NOT EDIT -->"

GeneratedBanner marks a page as generator output.

Variables

This section is empty.

Functions

func CleanBuild

func CleanBuild() error

CleanBuild removes compiled binary artifacts under build/.

func EscapeAngleBrackets

func EscapeAngleBrackets(s string) string

EscapeAngleBrackets replaces literal "<" and ">" with HTML entities.

func GitCommit

func GitCommit() string

GitCommit returns the short commit of the checkout being built, suffixed with "-dirty" when the working tree has uncommitted changes. When the commit cannot be resolved, it returns config.UnsetCLICommit.

func PaddedTable

func PaddedTable(header []string, rows [][]string) []string

PaddedTable renders a table in the aligned form required by repo style guides.

func RenderYAMLValue

func RenderYAMLValue(value any) string

RenderYAMLValue renders a default value the way it is written in YAML.

Types

This section is empty.

Jump to

Keyboard shortcuts

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