Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Conversation

ecoshub
Copy link
Contributor

@ecoshub ecoshub commented May 7, 2021

The GetInfoObjSize() function is controlling if typeID is exists by comparing the typeID value by zero. but ReadCmd (C_RD_NA_1: 0) type has a zero value in the infoObjSize array. so it conflicts that, is value really zero or not exists. So this PR is fixes this problem by changing infoObjSize type from []int to map[TypeID]int. and checking typeID existence by looking second parameter of indexing. map implementation completely fitting with array implementation.

@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #16 (64a7470) into master (ab2cf41) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #16   +/-   ##
=======================================
  Coverage   43.70%   43.70%           
=======================================
  Files          18       18           
  Lines        2304     2304           
=======================================
  Hits         1007     1007           
  Misses       1225     1225           
  Partials       72       72           
Impacted Files Coverage Δ
asdu/identifier.go 100.00% <100.00%> (ø)

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 ab2cf41...64a7470. Read the comment docs.

@thinkgos thinkgos merged commit cb52028 into thinkgos:master Sep 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants