diff --git a/pkg/asset/agent/manifests/network-scripts.go b/pkg/asset/agent/manifests/network-scripts.go index 867e47731db..ca769e93408 100644 --- a/pkg/asset/agent/manifests/network-scripts.go +++ b/pkg/asset/agent/manifests/network-scripts.go @@ -9,20 +9,20 @@ package manifests // /etc/assisted/network in the following structure: // /etc/assisted/network/ // -// +-- host1 -// | +--- *.nmconnection -// | +--- mac_interface.ini -// +-- host2 -// +--- *.nmconnection -// +--- mac_interface.ini -// 1. *.nmconnections - files generated by nmstate based on yaml files provided by the user -// 2. mac_interface.ini - the file contains mapping of mac-address to logical interface name. -// There are two usages for the file: -// a. Map logical interface name to MAC Address of the host. The logical interface name is a -// name provided by the user for the interface. It will be replaced by the script with the -// actual network interface name. -// b. Identify the host directory which belongs to the current host by matching a MAC Address -// from the mapping file with host network interfaces. +// +-- host1 +// | +--- *.nmconnection +// | +--- mac_interface.ini +// +-- host2 +// +--- *.nmconnection +// +--- mac_interface.ini +// 1. *.nmconnections - files generated by nmstate based on yaml files provided by the user +// 2. mac_interface.ini - the file contains mapping of mac-address to logical interface name. +// There are two usages for the file: +// a. Map logical interface name to MAC Address of the host. The logical interface name is a +// name provided by the user for the interface. It will be replaced by the script with the +// actual network interface name. +// b. Identify the host directory which belongs to the current host by matching a MAC Address +// from the mapping file with host network interfaces. // // Applying the network configuration of each host will be done by: // 1. Associate the current host with its matching hostX directory. The association will be done by diff --git a/pkg/destroy/aws/aws.go b/pkg/destroy/aws/aws.go index 288a5c75437..a5bc3f559ed 100644 --- a/pkg/destroy/aws/aws.go +++ b/pkg/destroy/aws/aws.go @@ -258,8 +258,9 @@ func (o *ClusterUninstaller) RunWithContext(ctx context.Context) ([]string, erro } // findResourcesToDelete returns the resources that should be deleted. -// tagClients - clients of the tagging API to use to search for resources. -// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. +// +// tagClients - clients of the tagging API to use to search for resources. +// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. func (o *ClusterUninstaller) findResourcesToDelete( ctx context.Context, tagClients []*resourcegroupstaggingapi.ResourceGroupsTaggingAPI, @@ -313,8 +314,9 @@ func (o *ClusterUninstaller) findResourcesToDelete( } // findResourcesByTag returns the resources with tags that satisfy the filters. -// tagClients - clients of the tagging API to use to search for resources. -// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. +// +// tagClients - clients of the tagging API to use to search for resources. +// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. func (o *ClusterUninstaller) findResourcesByTag( ctx context.Context, tagClient *resourcegroupstaggingapi.ResourceGroupsTaggingAPI, @@ -353,7 +355,8 @@ func (o *ClusterUninstaller) findResourcesByTag( } // findUntaggableResources returns the resources for the cluster that cannot be tagged. -// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. +// +// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. func (o *ClusterUninstaller) findUntaggableResources(ctx context.Context, iamClient *iam.IAM, deleted sets.String) (sets.String, error) { resources := sets.NewString() o.Logger.Debug("search for IAM instance profiles") @@ -375,7 +378,9 @@ func (o *ClusterUninstaller) findUntaggableResources(ctx context.Context, iamCli } // deleteResources deletes the specified resources. -// resources - the resources to be deleted. +// +// resources - the resources to be deleted. +// // The first return is the ARNs of the resources that were successfully deleted func (o *ClusterUninstaller) deleteResources(ctx context.Context, awsSession *session.Session, resources []string, tracker *errorTracker) (sets.String, error) { deleted := sets.NewString() diff --git a/pkg/destroy/aws/ec2helpers.go b/pkg/destroy/aws/ec2helpers.go index 83c73815c35..5ccef511acb 100644 --- a/pkg/destroy/aws/ec2helpers.go +++ b/pkg/destroy/aws/ec2helpers.go @@ -21,7 +21,8 @@ import ( // findEC2Instances returns the EC2 instances with tags that satisfy the filters. // returns two lists, first one is the list of all resources that are not terminated and are not in shutdown // stage and the second list is the list of resources that are not terminated. -// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. +// +// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. func findEC2Instances(ctx context.Context, ec2Client *ec2.EC2, deleted sets.String, filters []Filter, logger logrus.FieldLogger) ([]string, []string, error) { if ec2Client.Config.Region == nil { return nil, nil, errors.New("EC2 client does not have region configured") diff --git a/pkg/destroy/aws/iamhelpers.go b/pkg/destroy/aws/iamhelpers.go index 3cb306e7122..0f08979241b 100644 --- a/pkg/destroy/aws/iamhelpers.go +++ b/pkg/destroy/aws/iamhelpers.go @@ -132,7 +132,8 @@ func (search *iamUserSearch) arns(ctx context.Context) ([]string, error) { } // findIAMRoles returns the IAM roles for the cluster. -// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. +// +// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. func findIAMRoles(ctx context.Context, search *iamRoleSearch, deleted sets.String, logger logrus.FieldLogger) (sets.String, error) { logger.Debug("search for IAM roles") resources, _, err := search.find(ctx) @@ -144,7 +145,8 @@ func findIAMRoles(ctx context.Context, search *iamRoleSearch, deleted sets.Strin } // findIAMUsers returns the IAM users for the cluster. -// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. +// +// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored. func findIAMUsers(ctx context.Context, search *iamUserSearch, deleted sets.String, logger logrus.FieldLogger) (sets.String, error) { logger.Debug("search for IAM users") resources, err := search.arns(ctx) diff --git a/pkg/lineprinter/lineprinter.go b/pkg/lineprinter/lineprinter.go index c83cd126445..551dd46878f 100644 --- a/pkg/lineprinter/lineprinter.go +++ b/pkg/lineprinter/lineprinter.go @@ -10,8 +10,8 @@ import ( // Print is a type that can hold fmt.Print and other implementations // which match that signature. For example, you can use: // -// trimmer := &lineprinter.Trimmer{WrappedPrint: logrus.StandardLogger().Debug} -// linePrinter := &linePrinter{Print: trimmer.Print} +// trimmer := &lineprinter.Trimmer{WrappedPrint: logrus.StandardLogger().Debug} +// linePrinter := &linePrinter{Print: trimmer.Print} // // to connect the line printer to logrus at the debug level. type Print func(args ...interface{}) @@ -24,12 +24,12 @@ type Print func(args ...interface{}) // One use-case is connecting a subprocess's standard streams to a // logger: // -// linePrinter := &linePrinter{ -// Print: &Trimmer{WrappedPrint: logrus.StandardLogger().Debug}.Print, -// } -// defer linePrinter.Close() -// cmd := exec.Command(...) -// cmd.Stdout = linePrinter +// linePrinter := &linePrinter{ +// Print: &Trimmer{WrappedPrint: logrus.StandardLogger().Debug}.Print, +// } +// defer linePrinter.Close() +// cmd := exec.Command(...) +// cmd.Stdout = linePrinter // // LinePrinter buffers the subcommand's byte stream and splits it into // lines for the logger. Sometimes we might have a partial line diff --git a/pkg/migrate/azure/privatedns.go b/pkg/migrate/azure/privatedns.go index ba8a70b69d1..62a83671024 100644 --- a/pkg/migrate/azure/privatedns.go +++ b/pkg/migrate/azure/privatedns.go @@ -42,7 +42,7 @@ func newLegacyDNSClient(session *azconfig.Session, resourceGroup string) *legacy // Takes a subscription ID and parses the resource group out of it. // A subscription ID has the format "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxx-xxxxx-rg/providers/...". // Splitting the string on '/' gives us the following slice: -// parts[0] = '' +// parts[0] = ” // parts[1] = 'subscriptions' // parts[2] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' // parts[3] = 'resourceGroups' diff --git a/pkg/types/openstack/validation/networkextensions/networkextensions.go b/pkg/types/openstack/validation/networkextensions/networkextensions.go index f0825868b1d..a437f9b73a2 100644 --- a/pkg/types/openstack/validation/networkextensions/networkextensions.go +++ b/pkg/types/openstack/validation/networkextensions/networkextensions.go @@ -44,10 +44,10 @@ func Get(networkClient *gophercloud.ServiceClient) ([]extensions.Extension, erro // `standard-attr-tag` extension. // // We need to check that: -// 1. `standard-attr-tag` extension is enabled -// 2. `standard-attr-tag` covers all the necessary resources (from the -// extension description) or that the `tag` and `tag-ext` -// extensions are enabled as well +// 1. `standard-attr-tag` extension is enabled +// 2. `standard-attr-tag` covers all the necessary resources (from the +// extension description) or that the `tag` and `tag-ext` +// extensions are enabled as well func Validate(availableExtensions []extensions.Extension) error { var ( standardAttrTagEnabled = false