utils

package
v0.9.289 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromYAMLComment

func FromYAMLComment(input string) string

FromYAMLComment converts YAML comments back to regular multiline text by removing the "# " prefix from each line.

func MatchScenarioPredicate

func MatchScenarioPredicate(matched *types.APIKeyData, target *types.APIKeyData, requestCount uint64) bool

MatchScenarioPredicate checks if predicate match

func NopCloser

func NopCloser(r *bytes.Reader) io.ReadSeekCloser

NopCloser returns a ReadCloser with a no-op Close method wrapping the provided Reader r. If r implements WriterTo, the returned ReadCloser will implement WriterTo by forwarding calls to r.

func ReadAll

func ReadAll(body io.ReadCloser) (b []byte, reader io.ReadSeekCloser, err error)

ReadAll helper method

func ToYAMLComment

func ToYAMLComment(input string) string

ToYAMLComment converts a multiline string to YAML comment style by prefixing each line with "# ". Empty lines will have just "#" without the space.

Types

type ResetReader

type ResetReader interface {
	Reset() error
}

ResetReader is the interface for resetting reader

Jump to

Keyboard shortcuts

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