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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user