paramfile

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package paramfile expands a --param value that points at a file of values.

It deliberately lives under cmd/query/internal so the compiler keeps it out of reach of anything the server links: reading a path named by an HTTP request would be an arbitrary local-file read. Every caller here runs in the operator's own process, from their own shell.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(value string) ([]string, error)

Load expands one --param value. A value that does not start with "@" comes back unchanged as a single element; "@path[#selector]" reads path, where the selector names a CSV header column or a JSON object key.

A "!" prefix survives, so a file may carry exclusions and reads exactly like the comma-joined form typed on the command line.

func Parse

func Parse(pairs []string) (map[string]any, error)

Parse turns repeatable key=value flags into the param map query.Execute takes, expanding any @file reference. A plain value stays a string so a scalar param behaves exactly as it always has; an expanded file becomes a []string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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