From 364c193d3383fb4e0832708cbd966dc1a5223acd Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Mon, 16 Mar 2026 17:19:02 +0100 Subject: [PATCH] Style Signed-off-by: Bryan Frimin --- cmd/prb/main.go | 2 +- pkg/cmd/cmdutil/factory.go | 4 ++-- pkg/cmd/risk/create/create.go | 20 ++++++++++---------- pkg/cmd/risk/list/list.go | 2 +- pkg/cmd/risk/view/view.go | 30 +++++++++++++++--------------- pkg/cmd/soa/list/list.go | 2 +- pkg/cmd/soa/statement/add/add.go | 4 ++-- pkg/cmd/soa/statement/list/list.go | 2 +- pkg/cmd/user/list/list.go | 2 +- pkg/cmd/webhook/event/list/list.go | 2 +- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/cmd/prb/main.go b/cmd/prb/main.go index 2e627a02c..21314c329 100644 --- a/cmd/prb/main.go +++ b/cmd/prb/main.go @@ -40,7 +40,7 @@ func main() { f := &cmdutil.Factory{ IOStreams: ios, - Version: version, + Version: version, Config: func() (*config.Config, error) { return config.Load() }, diff --git a/pkg/cmd/cmdutil/factory.go b/pkg/cmd/cmdutil/factory.go index 663c6e93d..24fdb1a8d 100644 --- a/pkg/cmd/cmdutil/factory.go +++ b/pkg/cmd/cmdutil/factory.go @@ -21,6 +21,6 @@ import ( type Factory struct { IOStreams *iostreams.IOStreams - Version string - Config func() (*config.Config, error) + Version string + Config func() (*config.Config, error) } diff --git a/pkg/cmd/risk/create/create.go b/pkg/cmd/risk/create/create.go index 97091652e..881a38a99 100644 --- a/pkg/cmd/risk/create/create.go +++ b/pkg/cmd/risk/create/create.go @@ -49,16 +49,16 @@ type createResponse struct { CreateRisk struct { RiskEdge struct { Node struct { - ID string `json:"id"` - Name string `json:"name"` - Category string `json:"category"` - Treatment string `json:"treatment"` - InherentLikelihood int `json:"inherentLikelihood"` - InherentImpact int `json:"inherentImpact"` - InherentRiskScore int `json:"inherentRiskScore"` - ResidualLikelihood int `json:"residualLikelihood"` - ResidualImpact int `json:"residualImpact"` - ResidualRiskScore int `json:"residualRiskScore"` + ID string `json:"id"` + Name string `json:"name"` + Category string `json:"category"` + Treatment string `json:"treatment"` + InherentLikelihood int `json:"inherentLikelihood"` + InherentImpact int `json:"inherentImpact"` + InherentRiskScore int `json:"inherentRiskScore"` + ResidualLikelihood int `json:"residualLikelihood"` + ResidualImpact int `json:"residualImpact"` + ResidualRiskScore int `json:"residualRiskScore"` } `json:"node"` } `json:"riskEdge"` } `json:"createRisk"` diff --git a/pkg/cmd/risk/list/list.go b/pkg/cmd/risk/list/list.go index 325a93f2e..9e80d86d4 100644 --- a/pkg/cmd/risk/list/list.go +++ b/pkg/cmd/risk/list/list.go @@ -140,7 +140,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command { func(data json.RawMessage) (*api.Connection[risk], error) { var resp struct { Node *struct { - Typename string `json:"__typename"` + Typename string `json:"__typename"` Risks api.Connection[risk] `json:"risks"` } `json:"node"` } diff --git a/pkg/cmd/risk/view/view.go b/pkg/cmd/risk/view/view.go index 3f2b2ea20..2fa545489 100644 --- a/pkg/cmd/risk/view/view.go +++ b/pkg/cmd/risk/view/view.go @@ -50,21 +50,21 @@ query($id: ID!) { type viewResponse struct { Node *struct { - Typename string `json:"__typename"` - ID string `json:"id"` - Name string `json:"name"` - Description *string `json:"description"` - Category string `json:"category"` - Treatment string `json:"treatment"` - Note string `json:"note"` - InherentLikelihood int `json:"inherentLikelihood"` - InherentImpact int `json:"inherentImpact"` - InherentRiskScore int `json:"inherentRiskScore"` - ResidualLikelihood int `json:"residualLikelihood"` - ResidualImpact int `json:"residualImpact"` - ResidualRiskScore int `json:"residualRiskScore"` - CreatedAt string `json:"createdAt"` - UpdatedAt string `json:"updatedAt"` + Typename string `json:"__typename"` + ID string `json:"id"` + Name string `json:"name"` + Description *string `json:"description"` + Category string `json:"category"` + Treatment string `json:"treatment"` + Note string `json:"note"` + InherentLikelihood int `json:"inherentLikelihood"` + InherentImpact int `json:"inherentImpact"` + InherentRiskScore int `json:"inherentRiskScore"` + ResidualLikelihood int `json:"residualLikelihood"` + ResidualImpact int `json:"residualImpact"` + ResidualRiskScore int `json:"residualRiskScore"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` } `json:"node"` } diff --git a/pkg/cmd/soa/list/list.go b/pkg/cmd/soa/list/list.go index 7c2940dc5..dca03ac8c 100644 --- a/pkg/cmd/soa/list/list.go +++ b/pkg/cmd/soa/list/list.go @@ -121,7 +121,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command { func(data json.RawMessage) (*api.Connection[stateOfApplicability], error) { var resp struct { Node *struct { - Typename string `json:"__typename"` + Typename string `json:"__typename"` StatesOfApplicability api.Connection[stateOfApplicability] `json:"statesOfApplicability"` } `json:"node"` } diff --git a/pkg/cmd/soa/statement/add/add.go b/pkg/cmd/soa/statement/add/add.go index 35913f8b4..6d9775ae0 100644 --- a/pkg/cmd/soa/statement/add/add.go +++ b/pkg/cmd/soa/statement/add/add.go @@ -131,8 +131,8 @@ func NewCmdAdd(f *cmdutil.Factory) *cobra.Command { input := map[string]any{ "stateOfApplicabilityId": flagSoA, - "controlId": flagControl, - "applicability": flagApplicable, + "controlId": flagControl, + "applicability": flagApplicable, } if flagJustification != "" { diff --git a/pkg/cmd/soa/statement/list/list.go b/pkg/cmd/soa/statement/list/list.go index 3ae15a380..e50f05225 100644 --- a/pkg/cmd/soa/statement/list/list.go +++ b/pkg/cmd/soa/statement/list/list.go @@ -120,7 +120,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command { func(data json.RawMessage) (*api.Connection[applicabilityStatement], error) { var resp struct { Node *struct { - Typename string `json:"__typename"` + Typename string `json:"__typename"` ApplicabilityStatements api.Connection[applicabilityStatement] `json:"applicabilityStatements"` } `json:"node"` } diff --git a/pkg/cmd/user/list/list.go b/pkg/cmd/user/list/list.go index 39cac9504..f77000190 100644 --- a/pkg/cmd/user/list/list.go +++ b/pkg/cmd/user/list/list.go @@ -137,7 +137,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command { func(data json.RawMessage) (*api.Connection[profile], error) { var resp struct { Node *struct { - Typename string `json:"__typename"` + Typename string `json:"__typename"` Profiles api.Connection[profile] `json:"profiles"` } `json:"node"` } diff --git a/pkg/cmd/webhook/event/list/list.go b/pkg/cmd/webhook/event/list/list.go index 439382755..fad9c13dd 100644 --- a/pkg/cmd/webhook/event/list/list.go +++ b/pkg/cmd/webhook/event/list/list.go @@ -110,7 +110,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command { func(data json.RawMessage) (*api.Connection[webhookEvent], error) { var resp struct { Node *struct { - Typename string `json:"__typename"` + Typename string `json:"__typename"` Events api.Connection[webhookEvent] `json:"events"` } `json:"node"` }