relative

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package relative turns paths and file paths relative with string manipulation exclusively.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filepath

func Filepath(src, dst string) string

Filepath returns a path to dst, relative to src. Both paths must be relative or both paths must be absolute, and they must both be valid file paths for the current system.

This operation relies on string manipulation exlusively, so it doesn't fail.

func Path

func Path(src, dst string) string

Path returns a path to dst, relative to src. Both paths must be relative or both paths must be absolute, and they must both be /-separated.

This operation relies on string manipulation exlusively, so it doesn't fail.

Types

This section is empty.

Jump to

Keyboard shortcuts

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