mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-24 16:41:30 +02:00
agentnetwork: fix staticcheck S1016 in marshalGuardrailConfig
MergedPromptCapture and guardrailPromptCapture are now identical structs, so convert directly instead of copying field-by-field.
This commit is contained in:
@@ -838,10 +838,7 @@ func applyAccountCollectionControls(merged *MergedGuardrails, settings *types.Se
|
||||
func marshalGuardrailConfig(providerAllowlists map[string][]string, capture MergedPromptCapture) ([]byte, error) {
|
||||
cfg := guardrailConfig{
|
||||
ProviderAllowlists: providerAllowlists,
|
||||
PromptCapture: guardrailPromptCapture{
|
||||
Enabled: capture.Enabled,
|
||||
RedactPii: capture.RedactPii,
|
||||
},
|
||||
PromptCapture: guardrailPromptCapture(capture),
|
||||
}
|
||||
out, err := json.Marshal(cfg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user