project-machine / disko

Disk Operations API in Go
Apache License 2.0
13 stars 9 forks source link

Change custom MarshalJson to take objects not pointers. #39

Closed smoser closed 4 years ago

smoser commented 4 years ago

When dumping json of a DiskSet, I was not getting the custom MarshalJson on the Disks it contained. This change seems to allow to json.MarshalIndent() and have the strings output inside, and same for partitions and other things.

codecov[bot] commented 4 years ago

Codecov Report

Merging #39 into master will not change coverage. The diff coverage is 85.71%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #39   +/-   ##
=======================================
  Coverage   61.49%   61.49%           
=======================================
  Files          14       14           
  Lines        1444     1444           
=======================================
  Hits          888      888           
  Misses        495      495           
  Partials       61       61
Impacted Files Coverage Δ
disk.go 87.05% <100%> (ø) :arrow_up:
megaraid/megaraid.go 85.18% <66.66%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b8b9b01...4900503. Read the comment docs.