pathutil

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPath

func BuildPath(path string) string

BuildPath constructs a full path by prepending the configured path prefix to the given path. If no prefix is configured, returns the path as-is.

Examples:

  • BuildPath("/dashboard") with prefix "/pgbackweb" -> "/pgbackweb/dashboard"
  • BuildPath("/dashboard") with no prefix -> "/dashboard"
  • BuildPath("") with prefix "/pgbackweb" -> "/pgbackweb"

func GetPathPrefix

func GetPathPrefix() string

GetPathPrefix returns the configured path prefix.

func SetPathPrefix

func SetPathPrefix(prefix string)

SetPathPrefix sets the path prefix once. This should be called during application initialization with the value from the environment config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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