mirror of
https://github.com/prometheus-community/windows_exporter
synced 2025-02-10 16:49:06 +00:00
Fix parenthesis
This commit is contained in:
parent
e09497116f
commit
304972580d
@ -20,12 +20,12 @@ else {
|
|||||||
$members = @($wmiObject `
|
$members = @($wmiObject `
|
||||||
| Get-Member -MemberType Properties `
|
| Get-Member -MemberType Properties `
|
||||||
| Where-Object { $_.Definition -Match '^u?int' -and $_.Name -NotMatch '_' } `
|
| Where-Object { $_.Definition -Match '^u?int' -and $_.Name -NotMatch '_' } `
|
||||||
| Select-Object Name, @{Name="Type";Expression={$_.Definition.Split(" ")[0]}}
|
| Select-Object Name, @{Name="Type";Expression={$_.Definition.Split(" ")[0]}})
|
||||||
$input = @{
|
$input = @{
|
||||||
"Class"=$Class;
|
"Class"=$Class;
|
||||||
"CollectorName"=$CollectorName;
|
"CollectorName"=$CollectorName;
|
||||||
"Members"=$members
|
"Members"=$members
|
||||||
} | ConvertTo-Json)
|
} | ConvertTo-Json
|
||||||
$outFileName = "..\..\collector\$CollectorName.go".ToLower()
|
$outFileName = "..\..\collector\$CollectorName.go".ToLower()
|
||||||
$input | .\collector-generator.exe | Out-File -NoClobber -Encoding UTF8 $outFileName
|
$input | .\collector-generator.exe | Out-File -NoClobber -Encoding UTF8 $outFileName
|
||||||
go fmt $outFileName
|
go fmt $outFileName
|
||||||
|
Loading…
Reference in New Issue
Block a user