shared

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 3 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClassificationPath

func BuildClassificationPath(project string, includesScope bool, scopeName string, raw string) (string, error)

BuildClassificationPath prepares the path segment for Azure DevOps REST endpoints.

Rules and validations: - Accepts user input with either forward or backward slashes. - Uses the same normalization rules as NormalizeClassificationPath. - If the trimmed input is empty, returns ("", nil) to indicate "no path" (keeps existing callers behavior). - Removes a leading project segment (case-insensitive) if present. - If includesScope is true, removes a leading scopeName segment (case-insensitive) if present after project removal. - Rejects input that would produce empty segments (e.g., "a//b" after normalization should not happen because we collapse slashes). - Trims whitespace around each segment. - URL-escapes each segment with url.PathEscape and joins with forward slashes.

func NormalizeClassificationPath

func NormalizeClassificationPath(raw string) string

NormalizeClassificationPath normalizes classification node paths.

Behavior: - If raw is empty or only whitespace/slashes, returns an empty string. - Converts backslashes to forward slashes. - Trims surrounding whitespace. - Collapses consecutive slashes (e.g. "a//b" -> "a/b"). - Removes any leading and trailing slashes. Examples:

NormalizeClassificationPath("  \\Project\\Area\\Foo\\ ") -> "Project/Area/Foo"
NormalizeClassificationPath("/a//b/") -> "a/b"

Types

This section is empty.

Jump to

Keyboard shortcuts

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