diff --git a/pkg/common/genericSet.go b/pkg/common/genericSet.go index 9810c2827..94197a972 100644 --- a/pkg/common/genericSet.go +++ b/pkg/common/genericSet.go @@ -54,6 +54,9 @@ func (s GenericSet[T]) IsIntersect(s2 GenericSet[T]) bool { // ///////////////////////////////////////////////////////////////// // AnyMapEntry() return one arbitrary entry of a map. +// the user of this function should know that "arbitrary" means that *any* entry in the map can be returned, +// so, the user will probably use this function only in cases that it does not matter which of the entries is returned. +// however, the user can use this function for other cases, but she should know that it return an arbitrary entry of a map. // this func is not related to genericSet, // todo: consider moving to another file // todo: AnyMapEntry() for GenericSet, and use it diff --git a/pkg/vpcmodel/drawioOutput.go b/pkg/vpcmodel/drawioOutput.go index c761ca63a..1e85ace6b 100644 --- a/pkg/vpcmodel/drawioOutput.go +++ b/pkg/vpcmodel/drawioOutput.go @@ -19,11 +19,11 @@ func (e *edgeInfo) IsExternal() bool { } // DrawioOutputFormatter create the drawio connectivity map. -// It build the drawio tree out of the VPCConfigs and VPCConnectivitys, and output it to a drawio file +// It builds the drawio tree out of the VPCConfigs and VPCConnectivitys, and outputs it to a drawio file // the steps of creating the drawio tree: // 1. collect all the connectivity edges to a map of (src,dst,label) -> isDirected. also mark the nodes that has connections // 2. create the treeNodes of the NodeSets, filters. routers and nodes -// 3. create the edges from the map we created in stage (1). also set the routers to the edges +// 3. create the edges from the map we created in stage (1). also sets the routers to the edges type DrawioOutputFormatter struct { cConfigs map[string]*VPCConfig diff --git a/pkg/vpcmodel/output.go b/pkg/vpcmodel/output.go index 9b3ff9790..260c08643 100644 --- a/pkg/vpcmodel/output.go +++ b/pkg/vpcmodel/output.go @@ -140,11 +140,10 @@ type OutputFormatter interface { outFile string, grouping bool, uc OutputUseCase) (string, error) } -// serialOutputFormatter is the formatter for json, md, txt formats. +// serialOutputFormatter is the formatter for json, md and txt formats. // serialOutputFormatter implements the interface OutputFormatter. -// its hold an instance of a formater that implement -// its main flow of WriteOutput() of serialOutputFormatter is: -// 1. for each vpc, use a SingleVpcOutputFormatter to create a VPCsubnetConnectivity, +// the main flow of WriteOutput() of serialOutputFormatter is: +// 1. for each vpc, create and use a SingleVpcOutputFormatter to create a VPCsubnetConnectivity, // 2. aggregate the VPCsubnetConnectivity to one output type serialOutputFormatter struct { outFormat OutFormat