Fix missing __typename checks and standalone var declarations

Add __typename to GraphQL queries and type guards in risk view,
risk list, user view, and user list commands to prevent silent
garbage output when a wrong node type ID is passed. Wrap
standalone var declarations in var () blocks per style guide.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-15 12:24:39 +01:00
parent 0438b8457d
commit 779f549530
7 changed files with 49 additions and 15 deletions

View File

@@ -44,13 +44,15 @@ type (
}
)
var ValidKeys = []string{
"editor",
"browser",
"pager",
"prompt",
"http_timeout",
}
var (
ValidKeys = []string{
"editor",
"browser",
"pager",
"prompt",
"http_timeout",
}
)
func (c *Config) Get(key string) (string, error) {
switch key {