Documentation
¶
Overview ¶
Package urlsafe holds URL path segment safety predicates. It depends only on the standard library and on no other internal/* package so it can be imported from any layer without risking an import cycle. The predicate here is the single source of truth for "is this string safe to embed in a URL path segment"; every caller that builds a GitHub API URL from external input (the GITHUB_OWNER env var, repo names returned by the API) routes through this function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSafeURLSegment ¶
IsSafeURLSegment returns true if s is safe to embed in a URL path segment: it must be non-empty, not a traversal element ("." or ".."), and consist solely of GitHub's permitted owner/repo characters ([A-Za-z0-9._-]). Every caller that builds a GitHub API URL from external input routes through this allowlist, the single source of truth for path-segment safety.
Types ¶
This section is empty.