util

package
v0.0.0-...-52f0517 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package util provides utility functions for the remoteagent component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeAgentID

func SanitizeAgentID(agentID string) string

SanitizeAgentID sanitizes a string to be used as an agent ID.

All characters are not ASCII alphanumerics, underscores, or hyphens are replaced with an underscore, and the string is converted to lowercase.

func SanitizeFileName

func SanitizeFileName(fileName string) string

SanitizeFileName sanitizes a string to be used as a file name.

All characters that are not ASCII alphanumerics, underscores, or hyphens are replaced with an underscore, and the string is trimmed of extraneous whitespace and limited to 255 characters in length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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