path

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs added in v1.5.0

func Abs(p string) (string, error)

func Basename

func Basename(path string) string

func Clean added in v1.5.0

func Clean(p string) string

func Dirname

func Dirname(path string) string

func Join

func Join(paths ...string) string

func Realpath

func Realpath(path string) (string, error)

func RunAbs added in v1.5.0

func RunAbs(w io.Writer, args []string, opts AbsOptions) error

RunAbs prints the absolute path for each argument

func RunClean added in v1.5.0

func RunClean(w io.Writer, args []string, opts CleanOptions) error

RunClean prints the cleaned path for each argument

Types

type AbsOptions added in v1.5.0

type AbsOptions struct {
	JSON bool // --json: output as JSON
}

AbsOptions configures the path abs command behavior

type AbsResult added in v1.5.0

type AbsResult struct {
	Original string `json:"original"`
	Absolute string `json:"absolute"`
}

AbsResult represents abs output for JSON

type CleanOptions added in v1.5.0

type CleanOptions struct {
	JSON bool // --json: output as JSON
}

CleanOptions configures the path clean command behavior

type CleanResult added in v1.5.0

type CleanResult struct {
	Original string `json:"original"`
	Cleaned  string `json:"cleaned"`
}

CleanResult represents clean output for JSON

Jump to

Keyboard shortcuts

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