paramfile

package
v0.1.103 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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