np-guard / vpc-network-config-analyzer

A tool for analyzing the configured network connectivity of VPCs as specified by various VPC resources
Apache License 2.0
6 stars 0 forks source link

Explain structs - should they be receivers of explain print functions #630

Open ShiriMoran opened 2 weeks ago

ShiriMoran commented 2 weeks ago
          Hi

I have a general comment, "who is the receiver" comment, it has two points:

  1. A good practice is to put all the function of a receiver in one file.
  2. the receiver is not just another parameter, the main context of the function should be the receiver itself
  3. if you still think it is better not to put a func in another file, at list put all the functions of the receiver together.

in this function, I understand why you do not want to put it in the function of detailedConn, the context of this function is explainability, not detailedConn. I dont think that detailedConn should be the receiver here, just a parameter.

_Originally posted by @haim-kermany in https://github.com/np-guard/vpc-network-config-analyzer/pull/627#discussion_r1642181969_