Avoid unnecessary conversions
Those variables are already of the right type.
This commit is contained in:
parent
09296c0214
commit
f5edcf1922
@ -196,7 +196,7 @@ func (image *dockerImageAnalyzer) Analyze() (*AnalysisResult, error) {
|
|||||||
tree: image.trees[layerIdx],
|
tree: image.trees[layerIdx],
|
||||||
tarPath: manifest.LayerTarPaths[tarPathIdx],
|
tarPath: manifest.LayerTarPaths[tarPathIdx],
|
||||||
}
|
}
|
||||||
image.layers[layerIdx].history.Size = uint64(tree.FileSize)
|
image.layers[layerIdx].history.Size = tree.FileSize
|
||||||
|
|
||||||
tarPathIdx++
|
tarPathIdx++
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ func (image *dockerImageAnalyzer) Analyze() (*AnalysisResult, error) {
|
|||||||
UserSizeByes: userSizeBytes,
|
UserSizeByes: userSizeBytes,
|
||||||
SizeBytes: sizeBytes,
|
SizeBytes: sizeBytes,
|
||||||
WastedBytes: wastedBytes,
|
WastedBytes: wastedBytes,
|
||||||
WastedUserPercent: float64(float64(wastedBytes) / float64(userSizeBytes)),
|
WastedUserPercent: float64(wastedBytes) / float64(userSizeBytes),
|
||||||
Inefficiencies: inefficiencies,
|
Inefficiencies: inefficiencies,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user