powershell

package
v0.195.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 2 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHashTable

func FormatHashTable(table []KeyValue, variableName string) string

FormatHashTable formats table as a PowerShell hashtable. The caller is responsible for ensuring variableName is a valid PowerShell variable name and the key-value pairs can be surrounded by single-quoted strings.

func FormatParams

func FormatParams(params []KeyValue) string

FormatParams formats params into `-key "value"`, ignoring keys with empty values.

func FormatStringVariables

func FormatStringVariables(params []KeyValue) string

FormatStringVariables formats params as PowerShell string variables. The caller is responsible for ensuring the keys are valid PowerShell variable names and the values can be surrounded by single-quoted strings.

func JoinVariables

func JoinVariables(variables ...string) string

JoinVariables joins the specified variables.

func ToCLIArgs

func ToCLIArgs(params []KeyValue) string

ToCLIArgs formats params as CLI arguments.

Types

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

A KeyValue holds a key-value pair.

Jump to

Keyboard shortcuts

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