package strings

import "github.com/open-policy-agent/opa/internal/strings"

Package strings contains helpers to perform string manipulation

Index

Functions

func TruncateFilePaths

func TruncateFilePaths(maxIdealWidth, maxWidth int, path ...string) (map[string]string, int)

TruncateFilePaths truncates the given file paths to conform to the given "ideal" width and returns the shortened paths by replacing the middle parts of paths with "...", ex: bundle1/.../a/b/policy.rego

Source Files

strings.go

Version
v0.37.2
Published
Feb 11, 2022
Platform
windows/amd64
Imports
3 packages
Last checked
34 minutes ago

Tools for package owners.