Skip to content

Fix json marshalling of StatResult.Ncode field#57

Open
neelanand-sharma-sp wants to merge 2 commits into
duosecurity:masterfrom
neelanand-sharma-sp:master
Open

Fix json marshalling of StatResult.Ncode field#57
neelanand-sharma-sp wants to merge 2 commits into
duosecurity:masterfrom
neelanand-sharma-sp:master

Conversation

@neelanand-sharma-sp

Copy link
Copy Markdown

Code fix for correctly marshalling the StatResult's Ncode field in json format.

Description

Currently, the Ncode field of StatResult is marshalled as an empty object in json form. Needed a MarshalJSON func to correctly render the value in json.

Motivation and Context

Correctly maintains the backward compatibitlity with previous versions.

How Has This Been Tested?

Added tests for error response in admin/admin_test.go.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant