Skip to content
Snippets Groups Projects
Commit 621b649c authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Use return instead of Write-Output for generated strings

parent 45e9bb8f
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,7 @@ function Write-MetricHeader {
$Description="Metric without additional description from citrix_collector."
)
$MetricName = "${Pfx}_${Name}"
Write-Output "# HELP $MetricName $Description"
Write-Output "# TYPE $MetricName $Type"
return "# HELP $MetricName $Description`n# TYPE $MetricName $Type"
}
......@@ -101,7 +100,7 @@ function Write-Gauge {
if ($Header) {
Write-MetricHeader -Name $Name -Description $Description -Type "gauge"
}
Write-Output "$MetricName{$Properties} $Value"
return "$MetricName{$Properties} $Value"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment