util

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLineNumbers

func AddLineNumbers(content string) string

AddLineNumbers takes a string of content and returns a new string with line numbers prefixed

func IsPathContained

func IsPathContained(directory string, path string) (bool, error)

isPathContained attempts to verify whether `path` is the same as or contained within `directory`. It is overly cautious, returning false even if `path` IS contained within `directory`, but the two paths use different casing, and we happen to be on a case-insensitive filesystem. This is ultimately to attempt to stop an LLM from going outside of where I tell it to. Additional layers of security should be considered.. run in a VM/container.

func IsPathWithinCWD

func IsPathWithinCWD(path string) (bool, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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