diff --git a/cmd/mapt/cmd/aws/constants/contants.go b/cmd/mapt/cmd/aws/constants/contants.go new file mode 100644 index 000000000..89a967bca --- /dev/null +++ b/cmd/mapt/cmd/aws/constants/contants.go @@ -0,0 +1,14 @@ +package constants + +import "github.com/redhat-developer/mapt/pkg/provider/aws/action/mac" + +const ( + MACArch string = "arch" + MACArchDesc string = "MAC architecture allowed values x86, m1, m2" + MACArchDefault string = mac.DefaultArch + MACOSVersion string = "version" + MACOSVersionDesc string = "MACos operating system vestion 11, 12 on x86 and m1/m2; 13, 14 on all archs" + MACOSVersionDefault string = mac.DefaultOSVersion + MACFixedLocation string = "fixed-location" + MACFixedLocationDesc string = "if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION)" +) diff --git a/cmd/mapt/cmd/aws/hosts/constans.go b/cmd/mapt/cmd/aws/hosts/constans.go index 502f13c44..8ee28adf0 100644 --- a/cmd/mapt/cmd/aws/hosts/constans.go +++ b/cmd/mapt/cmd/aws/hosts/constans.go @@ -1,14 +1,10 @@ package hosts const ( - spot string = "spot" - spotDesc string = "if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION)" - airgap string = "airgap" - airgapDesc string = "if this flag is set the host will be created as airgap machine. Access will done through a bastion" - serverless string = "serverless" - serverlessDesc string = "if serverless is set the command will be executed as a serverless action." - timeout string = "timeout" - timeoutDesc string = "if timeout is set a serverless destroy actions will be set on the time according to the timeout. The Timeout value is a duration conforming to Go ParseDuration format." + spot string = "spot" + spotDesc string = "if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION)" + airgap string = "airgap" + airgapDesc string = "if this flag is set the host will be created as airgap machine. Access will done through a bastion" vmTypes string = "vm-types" vmTypesDescription string = "set an specific set of vm-types and ignore any CPUs, Memory, Arch parameters set. Note vm-type should match requested arch. Also if --spot flag is used set at least 3 types." diff --git a/cmd/mapt/cmd/aws/hosts/fedora.go b/cmd/mapt/cmd/aws/hosts/fedora.go index 819b6904a..7d8f5acb4 100644 --- a/cmd/mapt/cmd/aws/hosts/fedora.go +++ b/cmd/mapt/cmd/aws/hosts/fedora.go @@ -53,7 +53,8 @@ func getFedoraCreate() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // Initialize gh actions runner if needed if viper.IsSet(params.InstallGHActionsRunner) { @@ -81,7 +82,7 @@ func getFedoraCreate() *cobra.Command { VMType: viper.GetStringSlice(vmTypes), InstanceRequest: instanceRequest, Spot: viper.IsSet(spot), - Timeout: viper.GetString(timeout), + Timeout: viper.GetString(params.Timeout), SetupGHActionsRunner: viper.IsSet(params.InstallGHActionsRunner), Airgap: viper.IsSet(airgap)}); err != nil { logging.Error(err) @@ -97,7 +98,7 @@ func getFedoraCreate() *cobra.Command { flagSet.StringSliceP(vmTypes, "", []string{}, vmTypesDescription) flagSet.Bool(airgap, false, airgapDesc) flagSet.Bool(spot, false, spotDesc) - flagSet.StringP(timeout, "", "", timeout) + flagSet.StringP(params.Timeout, "", "", params.TimeoutDesc) flagSet.AddFlagSet(params.GetGHActionsFlagset()) flagSet.AddFlagSet(params.GetCpusAndMemoryFlagset()) c.PersistentFlags().AddFlagSet(flagSet) @@ -117,18 +118,19 @@ func getFedoraDestroy() *cobra.Command { viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + viper.IsSet(params.Serverless)) logging.Debug("Run fedora destroy") - if err := fedora.Destroy(viper.IsSet(serverless)); err != nil { + if err := fedora.Destroy(); err != nil { logging.Error(err) } return nil }, } flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError) - flagSet.Bool(serverless, false, serverlessDesc) + flagSet.Bool(params.Serverless, false, params.ServerlessDesc) c.PersistentFlags().AddFlagSet(flagSet) return c } diff --git a/cmd/mapt/cmd/aws/hosts/mac.go b/cmd/mapt/cmd/aws/hosts/mac.go index ee473437a..b6f94ecc4 100644 --- a/cmd/mapt/cmd/aws/hosts/mac.go +++ b/cmd/mapt/cmd/aws/hosts/mac.go @@ -1,6 +1,7 @@ package hosts import ( + awsParams "github.com/redhat-developer/mapt/cmd/mapt/cmd/aws/constants" params "github.com/redhat-developer/mapt/cmd/mapt/cmd/constants" maptContext "github.com/redhat-developer/mapt/pkg/manager/context" "github.com/redhat-developer/mapt/pkg/provider/aws/action/mac" @@ -19,16 +20,8 @@ const ( releaseCmd = "release" releaseCmdDesc = "release mac machine" - dhID string = "dedicated-host-id" - dhIDDesc string = "id for the dedicated host" - arch string = "arch" - archDesc string = "mac architecture allowed values x86, m1, m2" - archDefault string = mac.DefaultArch - osVersion string = "version" - osVersionDesc string = "macos operating system vestion 11, 12 on x86 and m1/m2; 13, 14 on all archs" - osDefault string = mac.DefaultOSVersion - fixedLocation string = "fixed-location" - fixedLocationDesc string = "if this flag is set the host will be created only on the region set by the AWS Env (AWS_DEFAULT_REGION)" + dhID string = "dedicated-host-id" + dhIDDesc string = "id for the dedicated host" ) func GetMacCmd() *cobra.Command { @@ -62,7 +55,8 @@ func getMacRequest() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // Initialize gh actions runner if needed if viper.IsSet(params.InstallGHActionsRunner) { @@ -79,9 +73,9 @@ func getMacRequest() *cobra.Command { if err := mac.Request( &mac.MacRequest{ Prefix: "main", - Architecture: viper.GetString(arch), - Version: viper.GetString(osVersion), - FixedLocation: viper.IsSet(fixedLocation), + Architecture: viper.GetString(awsParams.MACArch), + Version: viper.GetString(awsParams.MACOSVersion), + FixedLocation: viper.IsSet(awsParams.MACFixedLocation), SetupGHActionsRunner: viper.GetBool(params.InstallGHActionsRunner), Airgap: viper.IsSet(airgap)}); err != nil { logging.Error(err) @@ -92,9 +86,9 @@ func getMacRequest() *cobra.Command { flagSet := pflag.NewFlagSet(requestCmd, pflag.ExitOnError) flagSet.StringP(params.ConnectionDetailsOutput, "", "", params.ConnectionDetailsOutputDesc) flagSet.StringToStringP(params.Tags, "", nil, params.TagsDesc) - flagSet.StringP(arch, "", archDefault, archDesc) - flagSet.StringP(osVersion, "", osDefault, osVersionDesc) - flagSet.Bool(fixedLocation, false, fixedLocationDesc) + flagSet.StringP(awsParams.MACArch, "", awsParams.MACArchDefault, awsParams.MACArchDesc) + flagSet.StringP(awsParams.MACOSVersion, "", awsParams.MACOSVersion, awsParams.MACOSVersionDefault) + flagSet.Bool(awsParams.MACFixedLocation, false, awsParams.MACFixedLocationDesc) flagSet.Bool(airgap, false, airgapDesc) flagSet.AddFlagSet(params.GetGHActionsFlagset()) c.PersistentFlags().AddFlagSet(flagSet) diff --git a/cmd/mapt/cmd/aws/hosts/rhel.go b/cmd/mapt/cmd/aws/hosts/rhel.go index 5c8f3d6dc..06bd978c0 100644 --- a/cmd/mapt/cmd/aws/hosts/rhel.go +++ b/cmd/mapt/cmd/aws/hosts/rhel.go @@ -49,7 +49,8 @@ func getRHELCreate() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // Initialize gh actions runner if needed if viper.IsSet(params.InstallGHActionsRunner) { @@ -81,7 +82,7 @@ func getRHELCreate() *cobra.Command { SubsUserpass: viper.GetString(params.SubsUserpass), ProfileSNC: viper.IsSet(params.ProfileSNC), Spot: viper.IsSet(spot), - Timeout: viper.GetString(timeout), + Timeout: viper.GetString(params.Timeout), Airgap: viper.IsSet(airgap), SetupGHActionsRunner: viper.IsSet(params.InstallGHActionsRunner), }); err != nil { @@ -100,7 +101,7 @@ func getRHELCreate() *cobra.Command { flagSet.StringP(params.SubsUserpass, "", "", params.SubsUserpassDesc) flagSet.Bool(airgap, false, airgapDesc) flagSet.Bool(spot, false, spotDesc) - flagSet.StringP(timeout, "", "", timeout) + flagSet.StringP(params.Timeout, "", "", params.TimeoutDesc) flagSet.Bool(params.ProfileSNC, false, params.ProfileSNCDesc) flagSet.AddFlagSet(params.GetGHActionsFlagset()) flagSet.AddFlagSet(params.GetCpusAndMemoryFlagset()) @@ -121,16 +122,17 @@ func getRHELDestroy() *cobra.Command { viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + viper.IsSet(params.Serverless)) - if err := rhel.Destroy(viper.IsSet(serverless)); err != nil { + if err := rhel.Destroy(); err != nil { logging.Error(err) } return nil }, } flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError) - flagSet.Bool(serverless, false, serverlessDesc) + flagSet.Bool(params.Serverless, false, params.ServerlessDesc) c.PersistentFlags().AddFlagSet(flagSet) return c } diff --git a/cmd/mapt/cmd/aws/hosts/windows.go b/cmd/mapt/cmd/aws/hosts/windows.go index c421b8187..14c568720 100644 --- a/cmd/mapt/cmd/aws/hosts/windows.go +++ b/cmd/mapt/cmd/aws/hosts/windows.go @@ -62,7 +62,8 @@ func getWindowsCreate() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // Initialize gh actions runner if needed if viper.IsSet(params.InstallGHActionsRunner) { @@ -86,7 +87,7 @@ func getWindowsCreate() *cobra.Command { AMIKeepCopy: viper.IsSet(amiKeepCopy), Spot: viper.IsSet(spot), Airgap: viper.IsSet(airgap), - Timeout: viper.GetString(timeout), + Timeout: viper.GetString(params.Timeout), SetupGHActionsRunner: viper.IsSet(params.InstallGHActionsRunner), }); err != nil { logging.Error(err) @@ -103,7 +104,7 @@ func getWindowsCreate() *cobra.Command { flagSet.StringP(amiLang, "", amiLangDefault, amiLangDesc) flagSet.Bool(airgap, false, airgapDesc) flagSet.Bool(spot, false, spotDesc) - flagSet.StringP(timeout, "", "", timeout) + flagSet.StringP(params.Timeout, "", "", params.TimeoutDesc) flagSet.Bool(amiKeepCopy, false, amiKeepCopyDesc) flagSet.AddFlagSet(params.GetGHActionsFlagset()) c.PersistentFlags().AddFlagSet(flagSet) @@ -123,16 +124,17 @@ func getWindowsDestroy() *cobra.Command { viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + viper.IsSet(params.Serverless)) - if err := windows.Destroy(viper.IsSet(serverless)); err != nil { + if err := windows.Destroy(); err != nil { logging.Error(err) } return nil }, } flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError) - flagSet.Bool(serverless, false, serverlessDesc) + flagSet.Bool(params.Serverless, false, params.ServerlessDesc) c.PersistentFlags().AddFlagSet(flagSet) return c } diff --git a/cmd/mapt/cmd/aws/services/mac-pool.go b/cmd/mapt/cmd/aws/services/mac-pool.go new file mode 100644 index 000000000..0b3784de4 --- /dev/null +++ b/cmd/mapt/cmd/aws/services/mac-pool.go @@ -0,0 +1,139 @@ +package services + +import ( + awsParams "github.com/redhat-developer/mapt/cmd/mapt/cmd/aws/constants" + params "github.com/redhat-developer/mapt/cmd/mapt/cmd/constants" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + macpool "github.com/redhat-developer/mapt/pkg/provider/aws/action/mac-pool" + "github.com/redhat-developer/mapt/pkg/util/logging" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "github.com/spf13/viper" +) + +const ( + cmdMacPool = "mac-pool" + cmdMacPoolDesc = "mac pool operations" + + cmdHousekeep = "house-keep" + cmdHousekeepDesc = "house keeping for mac pool. Detroy old machines on over capacity and create new ones if capacity not meet" + + paramName = "name" + paramNameDesc = "pool name it is a unique identifier for the pool. The name should be unique for the whole AWS account" + paramOfferedCapacity = "offered-capacity" + paramOfferedCapacityDesc = "offered capacity to accept new workloads (non locked machines in the pool) at any given time. This is limited by max pool size parameter" + paramOfferedCapacityDefault = 1 + paramMaxSize = "max-size" + paramMaxSizeDesc = "max number of machines in the pool" + paramMaxSizeDefault = 2 +) + +func GetMacPoolCmd() *cobra.Command { + c := &cobra.Command{ + Use: cmdMacPool, + Short: cmdMacPoolDesc, + RunE: func(cmd *cobra.Command, args []string) error { + if err := viper.BindPFlags(cmd.Flags()); err != nil { + return err + } + return nil + }, + } + c.AddCommand( + getCreateMacPool(), + getHouseKeepingMacPool()) + return c +} + +func getCreateMacPool() *cobra.Command { + c := &cobra.Command{ + Use: params.CreateCmdName, + Short: params.CreateCmdName, + RunE: func(cmd *cobra.Command, args []string) error { + if err := viper.BindPFlags(cmd.Flags()); err != nil { + return err + } + // Initialize context + maptContext.Init( + viper.GetString(params.ProjectName), + viper.GetString(params.BackedURL), + viper.GetString(params.ConnectionDetailsOutput), + viper.GetStringMapString(params.Tags), + viper.IsSet(params.Debug), + viper.GetUint(params.DebugLevel), + false) + + if err := macpool.Create( + &macpool.RequestArgs{ + Prefix: "main", + PoolName: viper.GetString(paramName), + Architecture: viper.GetString(awsParams.MACArch), + OSVersion: viper.GetString(awsParams.MACOSVersion), + OfferedCapacity: viper.GetInt(paramOfferedCapacity), + MaxSize: viper.GetInt(paramMaxSize)}); err != nil { + // FixedLocation: viper.IsSet(awsParams.MACFixedLocation)}); err != nil { + logging.Error(err) + } + return nil + }, + } + flagSet := pflag.NewFlagSet(params.CreateCmdName, pflag.ExitOnError) + flagSet.StringP(params.ConnectionDetailsOutput, "", "", params.ConnectionDetailsOutputDesc) + flagSet.StringToStringP(params.Tags, "", nil, params.TagsDesc) + flagSet.StringP(paramName, "", "", paramNameDesc) + flagSet.Int(paramOfferedCapacity, paramOfferedCapacityDefault, paramOfferedCapacityDesc) + flagSet.Int(paramMaxSize, paramMaxSizeDefault, paramMaxSizeDesc) + flagSet.StringP(awsParams.MACArch, "", awsParams.MACArchDefault, awsParams.MACArchDesc) + flagSet.StringP(awsParams.MACOSVersion, "", awsParams.MACOSVersion, awsParams.MACOSVersionDefault) + // flagSet.Bool(awsParams.MACFixedLocation, false, awsParams.MACFixedLocationDesc) + flagSet.AddFlagSet(params.GetGHActionsFlagset()) + c.PersistentFlags().AddFlagSet(flagSet) + return c +} + +func getHouseKeepingMacPool() *cobra.Command { + c := &cobra.Command{ + Use: cmdHousekeep, + Short: cmdHousekeepDesc, + RunE: func(cmd *cobra.Command, args []string) error { + if err := viper.BindPFlags(cmd.Flags()); err != nil { + return err + } + // Initialize context + maptContext.Init( + viper.GetString(params.ProjectName), + viper.GetString(params.BackedURL), + viper.GetString(params.ConnectionDetailsOutput), + viper.GetStringMapString(params.Tags), + viper.IsSet(params.Debug), + viper.GetUint(params.DebugLevel), + viper.IsSet(params.Serverless)) + + if err := macpool.HouseKeeper( + &macpool.RequestArgs{ + Prefix: "main", + PoolName: viper.GetString(paramName), + Architecture: viper.GetString(awsParams.MACArch), + OSVersion: viper.GetString(awsParams.MACOSVersion), + OfferedCapacity: viper.GetInt(paramOfferedCapacity), + MaxSize: viper.GetInt(paramMaxSize)}); err != nil { + // FixedLocation: viper.IsSet(awsParams.MACFixedLocation)}); err != nil { + logging.Error(err) + } + return nil + }, + } + flagSet := pflag.NewFlagSet(params.CreateCmdName, pflag.ExitOnError) + flagSet.StringP(params.ConnectionDetailsOutput, "", "", params.ConnectionDetailsOutputDesc) + flagSet.StringToStringP(params.Tags, "", nil, params.TagsDesc) + flagSet.StringP(paramName, "", "", paramNameDesc) + flagSet.Int(paramOfferedCapacity, paramOfferedCapacityDefault, paramOfferedCapacityDesc) + flagSet.Int(paramMaxSize, paramMaxSizeDefault, paramMaxSizeDesc) + flagSet.StringP(awsParams.MACArch, "", awsParams.MACArchDefault, awsParams.MACArchDesc) + flagSet.StringP(awsParams.MACOSVersion, "", awsParams.MACOSVersion, awsParams.MACOSVersionDefault) + // flagSet.Bool(awsParams.MACFixedLocation, false, awsParams.MACFixedLocationDesc) + flagSet.Bool(params.Serverless, false, params.ServerlessDesc) + flagSet.AddFlagSet(params.GetGHActionsFlagset()) + c.PersistentFlags().AddFlagSet(flagSet) + return c +} diff --git a/cmd/mapt/cmd/aws/replica/replica.go b/cmd/mapt/cmd/aws/services/replica.go similarity index 99% rename from cmd/mapt/cmd/aws/replica/replica.go rename to cmd/mapt/cmd/aws/services/replica.go index c6873c6d7..b9c4ea0e3 100644 --- a/cmd/mapt/cmd/aws/replica/replica.go +++ b/cmd/mapt/cmd/aws/services/replica.go @@ -1,4 +1,4 @@ -package replica +package services import ( params "github.com/redhat-developer/mapt/cmd/mapt/cmd/constants" diff --git a/cmd/mapt/cmd/azure/hosts/linux.go b/cmd/mapt/cmd/azure/hosts/linux.go index 6fe21f249..2987eddd6 100644 --- a/cmd/mapt/cmd/azure/hosts/linux.go +++ b/cmd/mapt/cmd/azure/hosts/linux.go @@ -62,7 +62,8 @@ func getCreateLinux(ostype azureLinux.OSType, defaultOSVersion string) *cobra.Co viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // ParseEvictionRate var spotToleranceValue = spotAzure.DefaultEvictionRate @@ -128,7 +129,8 @@ func getDestroyLinux() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) if err := azureLinux.Destroy(); err != nil { logging.Error(err) } diff --git a/cmd/mapt/cmd/azure/hosts/rhel.go b/cmd/mapt/cmd/azure/hosts/rhel.go index 2012ca222..3f8b14405 100644 --- a/cmd/mapt/cmd/azure/hosts/rhel.go +++ b/cmd/mapt/cmd/azure/hosts/rhel.go @@ -53,7 +53,8 @@ func getCreateRHEL() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // ParseEvictionRate var spotToleranceValue = spotAzure.DefaultEvictionRate @@ -137,7 +138,8 @@ func getDestroyRHEL() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) if err := azureRHEL.Destroy(); err != nil { logging.Error(err) } diff --git a/cmd/mapt/cmd/azure/hosts/windows.go b/cmd/mapt/cmd/azure/hosts/windows.go index 8d71f86c8..2ed58c829 100644 --- a/cmd/mapt/cmd/azure/hosts/windows.go +++ b/cmd/mapt/cmd/azure/hosts/windows.go @@ -64,7 +64,8 @@ func getCreateWindowsDesktop() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // ParseEvictionRate var spotToleranceValue = spotAzure.DefaultEvictionRate @@ -147,7 +148,8 @@ func getDestroyWindowsDesktop() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) if err := azureWindows.Destroy(); err != nil { logging.Error(err) } diff --git a/cmd/mapt/cmd/azure/services/aks.go b/cmd/mapt/cmd/azure/services/aks.go index 95512f89a..46df8ec81 100644 --- a/cmd/mapt/cmd/azure/services/aks.go +++ b/cmd/mapt/cmd/azure/services/aks.go @@ -58,7 +58,8 @@ func getCreateAKS() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) // ParseEvictionRate var spotToleranceValue = spotAzure.DefaultEvictionRate @@ -115,7 +116,8 @@ func getDestroyAKS() *cobra.Command { viper.GetString(params.ConnectionDetailsOutput), viper.GetStringMapString(params.Tags), viper.IsSet(params.Debug), - viper.GetUint(params.DebugLevel)) + viper.GetUint(params.DebugLevel), + false) if err := azureAKS.Destroy(); err != nil { logging.Error(err) } diff --git a/cmd/mapt/cmd/constants/constants.go b/cmd/mapt/cmd/constants/constants.go index 71c52371a..19089d0d1 100644 --- a/cmd/mapt/cmd/constants/constants.go +++ b/cmd/mapt/cmd/constants/constants.go @@ -72,6 +72,12 @@ const ( RhelVersion string = "version" RhelVersionDesc string = "version for the RHEL OS" RhelVersionDefault string = "9.4" + + // Serverless + Timeout string = "timeout" + TimeoutDesc string = "if timeout is set a serverless destroy actions will be set on the time according to the timeout. The Timeout value is a duration conforming to Go ParseDuration format." + Serverless string = "serverless" + ServerlessDesc string = "if serverless is set the command will be executed as a serverless action." ) func GetGHActionsFlagset() *pflag.FlagSet { diff --git a/pkg/manager/context/context.go b/pkg/manager/context/context.go index 1bcf50833..84c9adfb9 100644 --- a/pkg/manager/context/context.go +++ b/pkg/manager/context/context.go @@ -26,7 +26,13 @@ const ( // store details for the current execution type context struct { - runID string + runID string + // serverless here is used to set the credentials based on + // roles inherid by tasks as serverless + // see SetAWSCredentials function + // take into account that the name may change as the approach to get + // credentials from role is more general approach + serverless bool projectName string backedURL string resultsOutput string @@ -38,9 +44,10 @@ type context struct { var c *context -func Init(projectName, backedURL, resultsOutput string, tags map[string]string, debug bool, debugLevel uint) { +func Init(projectName, backedURL, resultsOutput string, tags map[string]string, debug bool, debugLevel uint, serverless bool) { c = &context{ runID: CreateRunID(), + serverless: serverless, projectName: projectName, backedURL: backedURL, resultsOutput: resultsOutput, @@ -52,7 +59,7 @@ func Init(projectName, backedURL, resultsOutput string, tags map[string]string, logging.Debugf("context initialized for %s", c.runID) } -func InitBase(projectName, backedURL string, debug bool, debugLevel uint) { +func InitBase(projectName, backedURL string, debug bool, debugLevel uint, serverless bool) { c = &context{ projectName: projectName, backedURL: backedURL, @@ -61,6 +68,24 @@ func InitBase(projectName, backedURL string, debug bool, debugLevel uint) { } } +func RunID() string { return c.runID } + +func ProjectName() string { return c.projectName } + +func BackedURL() string { return c.backedURL } + +func GetResultsOutputPath() string { return c.resultsOutput } + +func GetTags() map[string]string { return c.tags } + +func ResourceTags() pulumi.StringMap { return ResourceTagsWithCustom(nil) } + +func Debug() bool { return c.debug } + +func DebugLevel() uint { return c.debugLevel } + +func IsServerless() bool { return c.serverless } + // It will create a runID // if context has been intialized it will set it as the runID for the context // otherwise it will return the value (one time value) @@ -72,15 +97,6 @@ func CreateRunID() string { return runID } -func GetTags() map[string]string { - return c.tags -} - -// Get tags ready to be added to any pulumi resource -func ResourceTags() pulumi.StringMap { - return ResourceTagsWithCustom(nil) -} - // Get tags ready to be added to any pulumi resource // in addition we cas set specific custom tags func ResourceTagsWithCustom(customTags map[string]string) pulumi.StringMap { @@ -97,34 +113,10 @@ func ResourceTagsWithCustom(customTags map[string]string) pulumi.StringMap { return c.tagsAsPulumiStringMap } -func RunID() string { - return c.runID -} - -func ProjectName() string { - return c.projectName -} - -func BackedURL() string { - return c.backedURL -} - -func GetResultsOutputPath() string { - return c.resultsOutput -} - func StackNameByProject(stackName string) string { return fmt.Sprintf("%s-%s", stackName, c.projectName) } -func Debug() bool { - return c.debug -} - -func DebugLevel() uint { - return c.debugLevel -} - func addCommonTags() { c.tags[tagKeyOrigin] = origin c.tags[TagKeyProjectName] = c.projectName diff --git a/pkg/provider/aws/action/fedora/fedora.go b/pkg/provider/aws/action/fedora/fedora.go index 8b7db0952..063a7393a 100644 --- a/pkg/provider/aws/action/fedora/fedora.go +++ b/pkg/provider/aws/action/fedora/fedora.go @@ -116,11 +116,10 @@ func Create(r *Request) error { } // Will destroy resources related to machine -func Destroy(serverless bool) (err error) { +func Destroy() (err error) { if err := aws.DestroyStack( aws.DestroyStackRequest{ - Stackname: stackName, - Serverless: serverless, + Stackname: stackName, }); err != nil { return err } diff --git a/pkg/provider/aws/action/mac-pool/mac-pool.go b/pkg/provider/aws/action/mac-pool/mac-pool.go new file mode 100644 index 000000000..20bd81349 --- /dev/null +++ b/pkg/provider/aws/action/mac-pool/mac-pool.go @@ -0,0 +1,218 @@ +package macpool + +import ( + "fmt" + "sort" + "strings" + "time" + + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" + macHost "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac/host" + macMachine "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac/machine" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/logging" +) + +// request and release (same approach as mac standard, but request never create machine underneath, this is handled by pool-capacity-keeper) +// TODO Important +// release and request will not behave the same if the run as targer vs as selfhosted runner. In that case for release we do not +// want it be added as selfhosted but only on request?? + +func Create(r *RequestArgs) error { + // Initially create pool with number of machines matching available capacity + // this is the number of machines free to accept workloads + // if err := validateNoExistingPool(); err != nil { + // return err + // } + if err := r.addMachinesToPool(r.OfferedCapacity); err != nil { + return err + } + if err := r.scheduleHouseKeeper(); err != nil { + return err + } + return nil +} + +// House keeper is the function executed serverless to check if is there any +// machine non locked which had been running more than 24h. +// It should check if capacity allows to remove the machine +func HouseKeeper(r *RequestArgs) error { + // First get full info on the pool + p, err := r.getPool() + if err != nil { + return err + } + // Pool under expected offered capacity + if p.currentOfferedCapacity() < p.offeredCapacity { + if p.currentPoolSize() < p.maxSize { + return r.addCapacity(p) + } + // if number of machines in the pool + to max machines + // we do nothing + return nil + } + // Pool over expected offered capacity need to destroy machines + if p.currentOfferedCapacity() > p.offeredCapacity { + if len(p.destroyableMachines) > 0 { + // Need to check if any offered can be destroy + return r.destroyCapacity(p) + } + } + // Otherwise nonLockedMachines meet Capacity so we do nothing + return nil +} + +func Request(r *RequestMachineArgs) error { + // TODO manage request + return fmt.Errorf("not implemented yet") +} + +func Release(r *ReleaseMachineArgs) error { + // TODO manage request + return fmt.Errorf("not implemented yet") +} + +func (r *RequestArgs) addMachinesToPool(n int) error { + if err := validateBackedURL(); err != nil { + return err + } + for i := 0; i < n; i++ { + hr := r.fillHostRequest() + dh, err := macHost.CreatePoolDedicatedHost(hr) + if err != nil { + return err + } + mr := r.fillMacRequest() + if err = mr.CreateMacMachine(dh); err != nil { + return err + } + } + return nil +} + +// Run serverless operation for house keeping +func (r *RequestArgs) scheduleHouseKeeper() error { + return fmt.Errorf("not implemented yet") +} + +// If we need less or equal than the max allowed on the pool we create all of them +// if need are more than allowed we can create just the allowed +func (r *RequestArgs) addCapacity(p *pool) error { + allowed := p.maxSize - p.offeredCapacity + needed := p.offeredCapacity - p.currentOfferedCapacity() + if needed <= allowed { + return r.addMachinesToPool(needed) + } + return r.addMachinesToPool(allowed) +} + +// If we need less or equal than the max allowed on the pool we create all of them +// if need are more than allowed we can create just the allowed + +// TODO check if on detroy do not remove VM so we can easily remove the host +func (r *RequestArgs) destroyCapacity(p *pool) error { + machinesToDestroy := p.currentOfferedCapacity() - p.offeredCapacity + for i := 0; i < machinesToDestroy; i++ { + m := p.destroyableMachines[i] + if err := aws.DestroyStack(aws.DestroyStackRequest{ + Stackname: mac.StackMacMachine, + Region: *m.Region, + BackedURL: *m.BackedURL, + }); err != nil { + return err + } + if err := aws.DestroyStack(aws.DestroyStackRequest{ + Stackname: mac.StackDedicatedHost, + // TODO check if needed to add region for backedURL + Region: *m.Region, + BackedURL: *m.BackedURL, + }); err != nil { + return err + } + } + return nil +} + +// format for remote backed url when creating the dedicated host +// the backed url from param is used as base and the ID is appended as sub path +func validateBackedURL() error { + if strings.Contains(maptContext.BackedURL(), "file://") { + return fmt.Errorf("local backed url is not allowed for mac pool") + } + return nil +} + +// This function will fill information about machines in the pool +// depending on their state and age full fill the struct to easily +// manage them +func (r *RequestArgs) getPool() (p *pool, err error) { + p.name = r.PoolName + p.offeredCapacity = r.OfferedCapacity + p.maxSize = r.MaxSize + + // TODO we need to get them based on the pool name + // also we need to add pool-name as tag on the hosts + // EXTRA check for unique names???? + p.machines, err = macHost.GetMatchingHostsInformation(r.Architecture) + if err != nil { + return nil, err + } + // non-locked + p.currentOfferedMachines = util.ArrayFilter(p.machines, + func(h *mac.HostInformation) bool { + isLocked, err := mac.IsMachineLocked(r.Prefix, h) + if err != nil { + logging.Errorf("error checking locking for machine %s", *h.Host.AssetId) + return false + } + return !isLocked + }) + // non-locked + older than 24 hours + macAgeDestroyRequeriemnt := time.Now().UTC(). + Add(-24 * time.Hour) + p.destroyableMachines = util.ArrayFilter(p.currentOfferedMachines, + func(h *mac.HostInformation) bool { + return h.Host.AllocationTime.UTC().Before(macAgeDestroyRequeriemnt) + }) + sort.Slice(p.destroyableMachines, func(i, j int) bool { + ha1 := *p.destroyableMachines[i].Host.AllocationTime + ha2 := *p.destroyableMachines[j].Host.AllocationTime + // Also need to ensure those are min 24 + return ha1.Before(ha2) + }) + return +} + +// transform pool request to host request +// need if we need to expand the pool +func (r *RequestArgs) fillHostRequest() *macHost.PoolMacDedicatedHostRequestArgs { + return &macHost.PoolMacDedicatedHostRequestArgs{ + MacDedicatedHost: &macHost.MacDedicatedHostRequestArgs{ + Prefix: r.Prefix, + Architecture: r.Architecture, + FixedLocation: r.FixedLocation, + }, + PoolID: &macHost.PoolID{ + PoolName: r.PoolName, + Arch: r.Architecture, + OSVersion: r.OSVersion, + }, + BackedURL: fmt.Sprintf("%s/%s", + maptContext.BackedURL(), + util.RandomID("mapt")), + } +} + +// transform pool request to machine request +// need if we need to expand the pool +func (r *RequestArgs) fillMacRequest() *macMachine.Request { + return &macMachine.Request{ + Prefix: r.Prefix, + Architecture: r.Architecture, + Version: r.OSVersion, + // SetupGHActionsRunner: r.SetupGHActionsRunner, + // Airgap: r.Airgap, + } +} diff --git a/pkg/provider/aws/action/mac-pool/types.go b/pkg/provider/aws/action/mac-pool/types.go new file mode 100644 index 000000000..c23a0d6ef --- /dev/null +++ b/pkg/provider/aws/action/mac-pool/types.go @@ -0,0 +1,52 @@ +package macpool + +import "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" + +type RequestArgs struct { + // Prefix for the resources related to mac + // this is relevant in case of an orchestration with multiple + // macs on the same stack + Prefix string + PoolName string + + // Machine params + Architecture string + OSVersion string + + // Pool params + // Capacity is the number of machines in the pool ready to process a workload + // at any given time + OfferedCapacity int + // Max is the max capacity of machines in the pool. Even if capacity is not meet if number of machines + // are equal to max it will not create more machines + MaxSize int + + // Location params + FixedLocation bool +} + +type RequestMachineArgs struct { + PoolName string +} + +type ReleaseMachineArgs struct { + MachineID string +} + +type pool struct { + // pool params + name string + offeredCapacity int + maxSize int + // all machines in the pool + machines []*mac.HostInformation + // non locked machines (not running a workload) + currentOfferedMachines []*mac.HostInformation + // machines which can be destroyed: + // non locked + older than 24 hours + // also this slice is order by age, so first is the oldest + destroyableMachines []*mac.HostInformation +} + +func (p *pool) currentOfferedCapacity() int { return len(p.currentOfferedMachines) } +func (p *pool) currentPoolSize() int { return len(p.machines) } diff --git a/pkg/provider/aws/action/mac/mac-dh.go b/pkg/provider/aws/action/mac/mac-dh.go deleted file mode 100644 index 51576d1c6..000000000 --- a/pkg/provider/aws/action/mac/mac-dh.go +++ /dev/null @@ -1,106 +0,0 @@ -package mac - -import ( - "fmt" - - "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" - "github.com/pulumi/pulumi/sdk/v3/go/auto" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/redhat-developer/mapt/pkg/manager" - maptContext "github.com/redhat-developer/mapt/pkg/manager/context" - "github.com/redhat-developer/mapt/pkg/provider/aws" - "github.com/redhat-developer/mapt/pkg/provider/aws/data" - "github.com/redhat-developer/mapt/pkg/provider/util/output" - "github.com/redhat-developer/mapt/pkg/util/logging" - resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" -) - -// Idea move away from multi file creation a set outputs as an unified yaml file -// type macdh struct { -// ID string `yaml:"id"` -// AZ string `yaml:"az"` -// BackedURL string `yaml:"backedurl"` -// ProjectName string `yaml:"projectname"` -// } - -// this creates the stack for the dedicated host -func (r *MacRequest) createDedicatedHost() (dhi *HostInformation, err error) { - // Get data required for create a dh - backedURL := getBackedURL() - r.Region, err = getRegion(r) - if err != nil { - return nil, err - } - r.AvailabilityZone, err = getAZ(r) - if err != nil { - return nil, err - } - logging.Debugf("creating a mac %s dedicated host state will be stored at %s", - r.Architecture, backedURL) - cs := manager.Stack{ - StackName: maptContext.StackNameByProject(stackDedicatedHost), - ProjectName: maptContext.ProjectName(), - BackedURL: backedURL, - ProviderCredentials: aws.GetClouProviderCredentials( - map[string]string{ - aws.CONFIG_AWS_REGION: *r.Region}), - DeployFunc: r.deployerDedicatedHost, - } - sr, _ := manager.UpStack(cs) - dhID, _, err := r.manageResultsDedicatedHost(sr) - if err != nil { - return nil, err - } - logging.Debugf("mac dedicated host with host id %s has been created successfully", *dhID) - host, err := data.GetDedicatedHost(*dhID) - if err != nil { - return nil, err - } - i := getHostInformation(*host) - dhi = i - return -} - -// this function will create the dedicated host resource -func (r *MacRequest) deployerDedicatedHost(ctx *pulumi.Context) (err error) { - backedURL := getBackedURL() - ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputRegion), pulumi.String(*r.Region)) - dh, err := ec2.NewDedicatedHost(ctx, - resourcesUtil.GetResourceName(r.Prefix, awsMacMachineID, "dh"), - &ec2.DedicatedHostArgs{ - AutoPlacement: pulumi.String("off"), - AvailabilityZone: pulumi.String(*r.AvailabilityZone), - InstanceType: pulumi.String(macTypesByArch[r.Architecture]), - Tags: maptContext.ResourceTagsWithCustom( - map[string]string{ - tagKeyBackedURL: backedURL, - tagKeyArch: r.Architecture, - maptContext.TagKeyRunID: maptContext.RunID(), - }), - }) - ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostID), dh.ID()) - ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostAZ), pulumi.String(*r.AvailabilityZone)) - if err != nil { - return err - } - return nil -} - -// results for dedicated host it will return dedicatedhost ID and dedicatedhost AZ -// also write results to files on the target folder -func (r *MacRequest) manageResultsDedicatedHost(stackResult auto.UpResult) (*string, *string, error) { - if err := output.Write(stackResult, maptContext.GetResultsOutputPath(), map[string]string{ - fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostID): "dedicated_host_id", - }); err != nil { - return nil, nil, err - } - dhID, ok := stackResult.Outputs[fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostID)].Value.(string) - if !ok { - return nil, nil, fmt.Errorf("error getting dedicated host ID") - } - dhAZ, ok := stackResult.Outputs[fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostAZ)].Value.(string) - if !ok { - return nil, nil, fmt.Errorf("error getting dedicated host AZ") - } - return &dhID, &dhAZ, nil -} diff --git a/pkg/provider/aws/action/mac/mac.go b/pkg/provider/aws/action/mac/mac.go index 1dce5b64b..0fb9d0b88 100644 --- a/pkg/provider/aws/action/mac/mac.go +++ b/pkg/provider/aws/action/mac/mac.go @@ -1,13 +1,12 @@ package mac import ( - _ "embed" - "fmt" - "strings" - maptContext "github.com/redhat-developer/mapt/pkg/manager/context" "github.com/redhat-developer/mapt/pkg/provider/aws" "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" + macHost "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac/host" + macMachine "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac/machine" "github.com/redhat-developer/mapt/pkg/provider/aws/services/tag" "github.com/redhat-developer/mapt/pkg/util/logging" ) @@ -29,7 +28,7 @@ import ( // ... func Request(r *MacRequest) error { // Get list of dedicated host ordered by allocation time - his, err := getMatchingHostsInformation(r.Architecture) + his, err := macHost.GetMatchingHostsInformation(r.Architecture) if err != nil { return err } @@ -41,14 +40,15 @@ func Request(r *MacRequest) error { // and replcae (create fresh env) // If for whatever reason the mac has no been created // stack does nt exist pick will require create not replace - hi, err := pickHost(r.Prefix, his) + hi, err := mac.PickHost(r.Prefix, his) if err != nil { if hi == nil { return err } return create(r, hi) } - err = r.replaceUserAccess(hi) + mr := r.fillMacRequest() + err = mr.ReplaceUserAccess(hi) if err != nil { return err } @@ -71,20 +71,20 @@ func Release(prefix string, hostID string, debug bool, debugLevel uint) error { if err != nil { return err } - hi := getHostInformation(*host) + hi := macHost.GetHostInformation(*host) // Set context based on info from dedicated host to be released maptContext.InitBase( *hi.ProjectName, *hi.BackedURL, - debug, debugLevel) + debug, debugLevel, false) // Set a default request - r := &MacRequest{ + mr := &macMachine.Request{ Prefix: prefix, Architecture: DefaultArch, Version: DefaultOSVersion, } - return r.replaceMachine(hi) + return mr.ReplaceMachine(hi) } // Initial scenario consider 1 machine @@ -95,28 +95,28 @@ func Destroy(prefix, hostID string, debug bool, debugLevel uint) error { if err != nil { return err } - hi := getHostInformation(*host) + hi := macHost.GetHostInformation(*host) // Set context based on info from dedicated host to be released maptContext.InitBase( *hi.ProjectName, *hi.BackedURL, - debug, debugLevel) + debug, debugLevel, false) // Dedicated host is not on a valid state to be deleted // With same backedURL check if machine is locked - machineLocked, err := isMachineLocked(prefix, hi) + machineLocked, err := mac.IsMachineLocked(prefix, hi) if err != nil { return err } if !machineLocked { if err := aws.DestroyStack(aws.DestroyStackRequest{ - Stackname: stackMacMachine, + Stackname: mac.StackMacMachine, Region: *hi.Region, BackedURL: *hi.BackedURL, }); err != nil { return err } return aws.DestroyStack(aws.DestroyStackRequest{ - Stackname: stackDedicatedHost, + Stackname: mac.StackDedicatedHost, // TODO check if needed to add region for backedURL Region: *hi.Region, BackedURL: *hi.BackedURL, @@ -138,37 +138,40 @@ func Destroy(prefix, hostID string, debug bool, debugLevel uint) error { // It will also create a mac machine based on the arch and version setup // and will set a lock on it -func create(r *MacRequest, dh *HostInformation) (err error) { +func create(r *MacRequest, dh *mac.HostInformation) (err error) { if dh == nil { - dh, err = r.createDedicatedHost() + hr := r.fillHostRequest() + // Get data required for create a dh + dh, err = macHost.CreateDedicatedHost(hr) if err != nil { return err } } + mr := r.fillMacRequest() // Setup the topology and install the mac machine if !r.Airgap { - return r.createMacMachine(dh) + return mr.CreateMacMachine(dh) } - return r.createAirgapMacMachine(dh) + return mr.CreateAirgapMacMachine(dh) } -// We will get a list of hosts from the pool ordered by allocation time -// We will apply several rules on them to pick the right one -// - TODO Remove those with allocation time > 24 h as they may destroyed -// - if none left use them again -// - if more available pick in order the first without lock -func pickHost(prefix string, his []*HostInformation) (*HostInformation, error) { - for _, h := range his { - isLocked, err := isMachineLocked(prefix, h) - if err != nil { - logging.Errorf("error checking if machine %s is locked", *h.Host.HostId) - if strings.Contains(err.Error(), "no stack") { - return h, err - } - } - if !isLocked { - return h, nil - } +func (r *MacRequest) fillHostRequest() *macHost.MacDedicatedHostRequestArgs { + return &macHost.MacDedicatedHostRequestArgs{ + Prefix: r.Prefix, + Architecture: r.Architecture, + FixedLocation: r.FixedLocation, + } +} + +func (r *MacRequest) fillMacRequest() *macMachine.Request { + return &macMachine.Request{ + Prefix: r.Prefix, + Architecture: r.Architecture, + Version: r.Version, + SetupGHActionsRunner: r.SetupGHActionsRunner, + Airgap: r.Airgap, + // Check these 2 + Region: r.Region, + AvailabilityZone: &r.Architecture, } - return nil, fmt.Errorf("all hosts are locked at the moment") } diff --git a/pkg/provider/aws/action/mac/types.go b/pkg/provider/aws/action/mac/types.go index 54c6610b7..616f4216c 100644 --- a/pkg/provider/aws/action/mac/types.go +++ b/pkg/provider/aws/action/mac/types.go @@ -1,10 +1,5 @@ package mac -import ( - ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" -) - type MacRequest struct { // Prefix for the resources related to mac // this is relevant in case of an orchestration with multiple @@ -22,30 +17,12 @@ type MacRequest struct { // Topology paras Airgap bool - // For airgap scenario there is an orchestation of - // a phase with connectivity on the machine (allowing bootstraping) - // a pahase with connectivyt off where the subnet for the target lost the nat gateway - airgapPhaseConnectivity network.Connectivity - - // operation control params - replace bool - lock bool // setup as github actions runner SetupGHActionsRunner bool - - // This value wil be used to dynamically expand the pool size - // MaxPoolSize *int - - // dh linkage - dedicatedHost *HostInformation } -type HostInformation struct { - Arch *string - BackedURL *string - ProjectName *string - RunID *string - Region *string - Host *ec2Types.Host -} +const ( + DefaultArch = "m2" + DefaultOSVersion = "15" +) diff --git a/pkg/provider/aws/action/rhel/rhel.go b/pkg/provider/aws/action/rhel/rhel.go index b25c9adc3..cd40223f2 100644 --- a/pkg/provider/aws/action/rhel/rhel.go +++ b/pkg/provider/aws/action/rhel/rhel.go @@ -112,11 +112,10 @@ func Create(r *Request) error { } // Will destroy resources related to machine -func Destroy(serverless bool) error { +func Destroy() error { if err := aws.DestroyStack( aws.DestroyStackRequest{ - Stackname: stackName, - Serverless: serverless, + Stackname: stackName, }); err != nil { return err } diff --git a/pkg/provider/aws/action/windows/windows.go b/pkg/provider/aws/action/windows/windows.go index 5bdef4c11..1b3c1735e 100644 --- a/pkg/provider/aws/action/windows/windows.go +++ b/pkg/provider/aws/action/windows/windows.go @@ -141,11 +141,10 @@ func Create(r *Request) error { } // Will destroy resources related to machine -func Destroy(serverless bool) (err error) { +func Destroy() (err error) { if err := aws.DestroyStack( aws.DestroyStackRequest{ - Stackname: stackName, - Serverless: serverless, + Stackname: stackName, }); err != nil { return err } diff --git a/pkg/provider/aws/aws.go b/pkg/provider/aws/aws.go index f3db0434b..02f32cc35 100644 --- a/pkg/provider/aws/aws.go +++ b/pkg/provider/aws/aws.go @@ -2,7 +2,10 @@ package aws import ( "context" + "encoding/json" "fmt" + "io" + "net/http" "os" "github.com/aws/aws-sdk-go-v2/aws" @@ -11,7 +14,6 @@ import ( "github.com/redhat-developer/mapt/pkg/manager" maptContext "github.com/redhat-developer/mapt/pkg/manager/context" "github.com/redhat-developer/mapt/pkg/manager/credentials" - awsCredentials "github.com/redhat-developer/mapt/pkg/provider/aws/util/credentials" "github.com/redhat-developer/mapt/pkg/util" "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/redhat-developer/mapt/pkg/util/maps" @@ -24,6 +26,12 @@ const ( CONFIG_AWS_SECRET_KEY string = "aws:secretKey" ) +const ( + metadataBaseURL = "http://169.254.170.2" + ecsCredentialsRelativeURIENV = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" + defaultAWSRegion = "us-east-1" +) + // pulumi config key : aws env credential var envCredentials = map[string]string{ CONFIG_AWS_REGION: "AWS_DEFAULT_REGION", @@ -40,6 +48,11 @@ func GetClouProviderCredentials(customCredentials map[string]string) credentials } func SetAWSCredentials(ctx context.Context, stack auto.Stack, customCredentials map[string]string) error { + if maptContext.IsServerless() { + if err := setCredentialsForServerless(); err != nil { + return err + } + } for configKey, envKey := range envCredentials { if value, ok := customCredentials[configKey]; ok { if err := stack.SetConfig(ctx, configKey, @@ -59,26 +72,16 @@ func SetAWSCredentials(ctx context.Context, stack auto.Stack, customCredentials } type DestroyStackRequest struct { - Serverless bool - Region string - BackedURL string - Stackname string + Region string + BackedURL string + Stackname string } func DestroyStack(s DestroyStackRequest) error { + logging.Debug("Running destroy operation") if len(s.Stackname) == 0 { return fmt.Errorf("stackname is required") } - logging.Debug("Running destroy operation") - if s.Serverless { - logging.Debug("Running destroy operation in serverless mode") - // When running as serverless Credendials should be retrieved based on the role - // for the serverless task being executed as so we need to get them and set as Envs - // to continue with default behavior - if err := awsCredentials.SetCredentialsFromContainerRole(); err != nil { - return err - } - } return manager.DestroyStack(manager.Stack{ StackName: maptContext.StackNameByProject(s.Stackname), ProjectName: maptContext.ProjectName(), @@ -106,3 +109,57 @@ func GetTagsAsFilters() (filters []*awsEC2Types.Filter) { } return } + +// https://docs.aws.amazon.com/sdkref/latest/guide/feature-container-credentials.html +// When running as serverless Credendials should be retrieved based on the role +// for the serverless task being executed as so we need to get them and set as Envs +// to continue with default behavior +func setCredentialsForServerless() error { + relativeURI := os.Getenv(ecsCredentialsRelativeURIENV) + if relativeURI == "" { + return fmt.Errorf("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI not set. Are you running in an ECS container?") + } + resp, err := http.Get(fmt.Sprintf("%s/%s", metadataBaseURL, relativeURI)) + if err != nil { + return err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("failed to fetch credentials, status code: %d", resp.StatusCode) + } + // Parse the response + body, err := io.ReadAll(resp.Body) + if err != nil { + return fmt.Errorf("failed to fetch credentials, status code: %d", resp.StatusCode) + + } + var credentials struct { + AccessKeyID string `json:"AccessKeyId"` + SecretAccessKey string `json:"SecretAccessKey"` + SessionToken string `json:"Token"` + Expiration string `json:"Expiration"` + } + err = json.Unmarshal(body, &credentials) + if err != nil { + fmt.Printf("Error parsing JSON: %v\n", err) + os.Exit(1) + } + logging.Debug("We are runnging on serverless mode so we will set the ephemeral Envs for it") + if err := os.Setenv("AWS_ACCESS_KEY_ID", credentials.AccessKeyID); err != nil { + return err + } + if err := os.Setenv("AWS_SECRET_ACCESS_KEY", credentials.SecretAccessKey); err != nil { + return err + } + if err := os.Setenv("AWS_SESSION_TOKEN", credentials.SessionToken); err != nil { + return err + } + if err := os.Setenv("AWS_DEFAULT_REGION", defaultAWSRegion); err != nil { + return err + } + if err := os.Setenv("AWS_REGION", defaultAWSRegion); err != nil { + return err + } + return nil +} diff --git a/pkg/provider/aws/modules/mac/host/host.go b/pkg/provider/aws/modules/mac/host/host.go new file mode 100644 index 000000000..e9f62793f --- /dev/null +++ b/pkg/provider/aws/modules/mac/host/host.go @@ -0,0 +1,132 @@ +package host + +import ( + "fmt" + "maps" + + "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" + "github.com/pulumi/pulumi/sdk/v3/go/auto" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/util/logging" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" +) + +// Idea move away from multi file creation a set outputs as an unified yaml file +// type macdh struct { +// ID string `yaml:"id"` +// AZ string `yaml:"az"` +// BackedURL string `yaml:"backedurl"` +// ProjectName string `yaml:"projectname"` +// } + +func CreatePoolDedicatedHost(args *PoolMacDedicatedHostRequestArgs) (dhi *mac.HostInformation, err error) { + tags := map[string]string{ + tagKeyBackedURL: args.BackedURL, + maptContext.TagKeyRunID: maptContext.RunID(), + } + maps.Copy(tags, args.PoolID.asTags()) + return createDedicatedHost(args.MacDedicatedHost, args.BackedURL, tags, false) +} + +// this creates the stack for the dedicated host +func CreateDedicatedHost(args *MacDedicatedHostRequestArgs) (dhi *mac.HostInformation, err error) { + backedURL := getBackedURL() + tags := map[string]string{ + tagKeyBackedURL: backedURL, + tagKeyArch: args.Architecture, + maptContext.TagKeyRunID: maptContext.RunID(), + } + return createDedicatedHost(args, backedURL, tags, true) +} + +func createDedicatedHost(args *MacDedicatedHostRequestArgs, + backedURL string, + tags map[string]string, + exportOutputs bool) (dhi *mac.HostInformation, err error) { + // mac does not offer spot, this will check region based on default region Env, + // if machine type is not offered on the region it will try to find a new region for it + dHArgs := dedicatedHostArgs{ + prefix: args.Prefix, + arch: args.Architecture, + } + dHArgs.region, err = getRegion(args.Architecture, args.FixedLocation) + if err != nil { + return nil, err + } + // pick random az from region ensuring machine is offered (sometimes machines are not offered on each az from a region) + dHArgs.availabilityZone, err = getAZ(*dHArgs.region, args.Architecture) + if err != nil { + return nil, err + } + cs := manager.Stack{ + StackName: maptContext.StackNameByProject(mac.StackDedicatedHost), + ProjectName: maptContext.ProjectName(), + BackedURL: backedURL, + ProviderCredentials: aws.GetClouProviderCredentials( + map[string]string{ + aws.CONFIG_AWS_REGION: *dHArgs.region}), + DeployFunc: dHArgs.deploy, + } + sr, _ := manager.UpStack(cs) + dhID, _, err := manageResultsDedicatedHost(sr, dHArgs.prefix, exportOutputs) + if err != nil { + return nil, err + } + logging.Debugf("mac dedicated host with host id %s has been created successfully", *dhID) + host, err := data.GetDedicatedHost(*dhID) + if err != nil { + return nil, err + } + i := GetHostInformation(*host) + dhi = i + return +} + +// this function will create the dedicated host resource +func (r *dedicatedHostArgs) deploy(ctx *pulumi.Context) (err error) { + ctx.Export(fmt.Sprintf("%s-%s", r.prefix, outputRegion), pulumi.String(*r.region)) + dh, err := ec2.NewDedicatedHost(ctx, + resourcesUtil.GetResourceName(r.prefix, awsMacHostID, "dh"), + &ec2.DedicatedHostArgs{ + AutoPlacement: pulumi.String("off"), + AvailabilityZone: pulumi.String(*r.availabilityZone), + InstanceType: pulumi.String(mac.TypesByArch[r.arch]), + Tags: maptContext.ResourceTagsWithCustom(r.tags), + }) + ctx.Export(fmt.Sprintf("%s-%s", r.prefix, outputDedicatedHostID), + dh.ID()) + ctx.Export(fmt.Sprintf("%s-%s", r.prefix, outputDedicatedHostAZ), + pulumi.String(*r.availabilityZone)) + if err != nil { + return err + } + return nil +} + +// results for dedicated host it will return dedicatedhost ID and dedicatedhost AZ +// also write results to files on the target folder +func manageResultsDedicatedHost( + stackResult auto.UpResult, prefix string, export bool) (*string, *string, error) { + if export { + if err := output.Write(stackResult, maptContext.GetResultsOutputPath(), map[string]string{ + fmt.Sprintf("%s-%s", prefix, outputDedicatedHostID): "dedicated_host_id", + }); err != nil { + return nil, nil, err + } + } + dhID, ok := stackResult.Outputs[fmt.Sprintf("%s-%s", prefix, outputDedicatedHostID)].Value.(string) + if !ok { + return nil, nil, fmt.Errorf("error getting dedicated host ID") + } + dhAZ, ok := stackResult.Outputs[fmt.Sprintf("%s-%s", prefix, outputDedicatedHostAZ)].Value.(string) + if !ok { + return nil, nil, fmt.Errorf("error getting dedicated host AZ") + } + return &dhID, &dhAZ, nil +} diff --git a/pkg/provider/aws/modules/mac/host/types.go b/pkg/provider/aws/modules/mac/host/types.go new file mode 100644 index 000000000..f781eb231 --- /dev/null +++ b/pkg/provider/aws/modules/mac/host/types.go @@ -0,0 +1,59 @@ +package host + +const ( + // mapt internal ID for the component: nac dedicated host + awsMacHostID = "amh" + + tagKeyBackedURL = "backedURL" + tagKeyArch = "arch" + // tags added when dedicated host is part of a pool + tagKeyOSVersion = "osVersion" + tagKeyPoolName = "poolName" + + outputDedicatedHostID = "ammDedicatedHostID" + outputDedicatedHostAZ = "ammDedicatedHostAZ" + outputRegion = "ammRegion" +) + +type MacDedicatedHostRequestArgs struct { + // Allow orquestrate + Prefix string + + Architecture string + FixedLocation bool +} + +type PoolID struct { + PoolName string + Arch string + OSVersion string +} + +func (p *PoolID) asTags() map[string]string { + return map[string]string{ + tagKeyArch: p.Arch, + tagKeyOSVersion: p.OSVersion, + tagKeyPoolName: p.PoolName, + } +} + +type PoolMacDedicatedHostRequestArgs struct { + BackedURL string + MacDedicatedHost *MacDedicatedHostRequestArgs + PoolID *PoolID +} + +type dedicatedHostArgs struct { + prefix string + arch string + region *string + availabilityZone *string + tags map[string]string +} + +var ( + awsArchIDbyArch = map[string]string{ + "x86": "x86_64_mac", + "m1": "arm64_mac", + "m2": "arm64_mac"} +) diff --git a/pkg/provider/aws/action/mac/util.go b/pkg/provider/aws/modules/mac/host/util.go similarity index 72% rename from pkg/provider/aws/action/mac/util.go rename to pkg/provider/aws/modules/mac/host/util.go index 416e4e5eb..4cc4e3363 100644 --- a/pkg/provider/aws/action/mac/util.go +++ b/pkg/provider/aws/modules/mac/host/util.go @@ -1,4 +1,4 @@ -package mac +package host import ( "fmt" @@ -8,46 +8,23 @@ import ( ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" maptContext "github.com/redhat-developer/mapt/pkg/manager/context" "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" "github.com/redhat-developer/mapt/pkg/util/logging" "golang.org/x/exp/slices" ) -// Compose information around dedicated host -func getHostInformation(h ec2Types.Host) *HostInformation { - az := *h.AvailabilityZone - region := az[:len(az)-1] - archValue := awsArchIDbyArch[*getTagValue(h.Tags, tagKeyArch)] - return &HostInformation{ - Arch: &archValue, - BackedURL: getTagValue(h.Tags, tagKeyBackedURL), - ProjectName: getTagValue(h.Tags, maptContext.TagKeyProjectName), - RunID: getTagValue(h.Tags, maptContext.TagKeyRunID), - Region: ®ion, - Host: &h, - } -} - -func getTagValue(tags []ec2Types.Tag, tagKey string) *string { - return tags[slices.IndexFunc( - tags, - func(t ec2Types.Tag) bool { - return *t.Key == tagKey - })].Value -} - -// format for remote backed url when creating the dedicated host -// the backed url from param is used as base and the ID is appended as sub path -func getBackedURL() string { - if strings.Contains(maptContext.BackedURL(), "file://") { - return maptContext.BackedURL() - } - return fmt.Sprintf("%s/%s", maptContext.BackedURL(), maptContext.RunID()) +// Get all dedicated hosts matching the tags + arch +// it will return the list ordered by allocation time +func GetMatchingHostsInformation(arch string) ([]*mac.HostInformation, error) { + matchingTags := maptContext.GetTags() + matchingTags[tagKeyArch] = arch + return GetMatchingHostsInStateInformation(matchingTags, nil) } // Get all dedicated hosts matching the tags + arch // it will return the list ordered by allocation time -func getMatchingHostsInformation(arch string) ([]*HostInformation, error) { - return getMatchingHostsInStateInformation(arch, nil) +func GetPoolDedicatedHostsInformation(id *PoolID) ([]*mac.HostInformation, error) { + return GetMatchingHostsInStateInformation(id.asTags(), nil) } // Get all dedicated hosts in available state ordered based on the allocation time @@ -57,71 +34,105 @@ func getMatchingHostsInformation(arch string) ([]*HostInformation, error) { // return getMatchingHostsInStateInformation(arch, &as) // } +// format for remote backed url when creating the dedicated host +// the backed url from param is used as base and the ID is appended as sub path +func getBackedURL() string { + if strings.Contains(maptContext.BackedURL(), "file://") { + return maptContext.BackedURL() + } + return fmt.Sprintf("%s/%s", maptContext.BackedURL(), maptContext.RunID()) +} + // Get all dedicated hosts by tag and state -func getMatchingHostsInStateInformation(arch string, state *ec2Types.AllocationState) ([]*HostInformation, error) { - matchingTags := maptContext.GetTags() - matchingTags[tagKeyArch] = arch +func GetMatchingHostsInStateInformation(matchingTags map[string]string, state *ec2Types.AllocationState) ([]*mac.HostInformation, error) { hosts, err := data.GetDedicatedHosts(data.DedicatedHostResquest{ Tags: matchingTags, }) if err != nil { return nil, err } - var r []*HostInformation + var r []*mac.HostInformation for _, dh := range hosts { if state == nil || (state != nil && dh.State == *state) { - r = append(r, getHostInformation(dh)) + r = append(r, GetHostInformation(dh)) } } // Order by allocation time, first newest if len(r) > 1 { - slices.SortFunc(r, func(a, b *HostInformation) int { + slices.SortFunc(r, func(a, b *mac.HostInformation) int { return b.Host.AllocationTime.Compare(*a.Host.AllocationTime) }) } return r, nil } +// Compose information around dedicated host +func GetHostInformation(h ec2Types.Host) *mac.HostInformation { + az := *h.AvailabilityZone + region := az[:len(az)-1] + archValue := awsArchIDbyArch[*getTagValue(h.Tags, tagKeyArch)] + return &mac.HostInformation{ + Arch: &archValue, + BackedURL: getTagValue(h.Tags, tagKeyBackedURL), + ProjectName: getTagValue(h.Tags, maptContext.TagKeyProjectName), + RunID: getTagValue(h.Tags, maptContext.TagKeyRunID), + Region: ®ion, + Host: &h, + } +} + +func getTagValue(tags []ec2Types.Tag, tagKey string) *string { + return tags[slices.IndexFunc( + tags, + func(t ec2Types.Tag) bool { + return *t.Key == tagKey + })].Value +} + // checks if the machine can be created on the current location (machine type is available on the region) // if it available it returns the region name // if not offered and machine should be created on the region it will return an error // if not offered and machine could be created anywhere it will get a region offering the machine and return its name -func getRegion(r *MacRequest) (*string, error) { +func getRegion(arch string, fixedLocation bool) (*string, error) { logging.Debugf("checking if %s is offered at %s", - r.Architecture, + arch, os.Getenv("AWS_DEFAULT_REGION")) isOffered, err := data.IsInstanceTypeOfferedByRegion( - macTypesByArch[r.Architecture], + mac.TypesByArch[arch], os.Getenv("AWS_DEFAULT_REGION")) if err != nil { return nil, err } if isOffered { - logging.Debugf("%s offers it", os.Getenv("AWS_DEFAULT_REGION")) + logging.Debugf("%s offers it", + os.Getenv("AWS_DEFAULT_REGION")) region := os.Getenv("AWS_DEFAULT_REGION") return ®ion, nil } - if !isOffered && r.FixedLocation { + if !isOffered && fixedLocation { return nil, fmt.Errorf("the requested mac %s is not available at the current region %s and the fixed-location flag has been set", - r.Architecture, + arch, os.Getenv("AWS_DEFAULT_REGION")) } // We look for a region offering the type of instance - logging.Debugf("%s is not offered, a new region offering it will be used instead", os.Getenv("AWS_DEFAULT_REGION")) + logging.Debugf("%s is not offered, a new region offering it will be used instead", + os.Getenv("AWS_DEFAULT_REGION")) return data.LokupRegionOfferingInstanceType( - macTypesByArch[r.Architecture]) + mac.TypesByArch[arch]) } // Get a random AZ from the requested region, it ensures the az offers the instance type -func getAZ(r *MacRequest) (az *string, err error) { +func getAZ(region, arch string) (az *string, err error) { isOffered := false var excludedAZs []string for !isOffered { - az, err = data.GetRandomAvailabilityZone(*r.Region, excludedAZs) + az, err = data.GetRandomAvailabilityZone(region, excludedAZs) if err != nil { return nil, err } - isOffered, err = data.IsInstanceTypeOfferedByAZ(*r.Region, macTypesByArch[r.Architecture], *az) + isOffered, err = data.IsInstanceTypeOfferedByAZ( + region, + mac.TypesByArch[arch], *az) if err != nil { return nil, err } diff --git a/pkg/provider/aws/action/mac/bootstrap.sh b/pkg/provider/aws/modules/mac/machine/bootstrap.sh similarity index 100% rename from pkg/provider/aws/action/mac/bootstrap.sh rename to pkg/provider/aws/modules/mac/machine/bootstrap.sh diff --git a/pkg/provider/aws/action/mac/mac-machine.go b/pkg/provider/aws/modules/mac/machine/machine.go similarity index 88% rename from pkg/provider/aws/action/mac/mac-machine.go rename to pkg/provider/aws/modules/mac/machine/machine.go index c93570686..27aff712f 100644 --- a/pkg/provider/aws/action/mac/mac-machine.go +++ b/pkg/provider/aws/modules/mac/machine/machine.go @@ -1,4 +1,4 @@ -package mac +package machine import ( _ "embed" @@ -10,6 +10,7 @@ import ( "github.com/redhat-developer/mapt/pkg/provider/aws" "github.com/redhat-developer/mapt/pkg/provider/aws/data" "github.com/redhat-developer/mapt/pkg/provider/aws/modules/bastion" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" qEC2 "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/compute" "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/keypair" @@ -48,29 +49,10 @@ type locked struct { Lock bool } -func isMachineLocked(prefix string, h *HostInformation) (bool, error) { - s, err := manager.CheckStack(manager.Stack{ - StackName: maptContext.StackNameByProject(stackMacMachine), - ProjectName: maptContext.ProjectName(), - BackedURL: *h.BackedURL, - ProviderCredentials: aws.GetClouProviderCredentials( - map[string]string{ - aws.CONFIG_AWS_REGION: *h.Region}), - }) - if err != nil { - return false, err - } - outputs, err := manager.GetOutputs(s) - if err != nil { - return false, err - } - return outputs[fmt.Sprintf("%s-%s", prefix, outputLock)].Value.(bool), nil -} - // This function will use the information from the // dedicated host holding the mac machine will check if stack exists // if exists will get the lock value from it -func (r *MacRequest) replaceMachine(h *HostInformation) error { +func (r *Request) ReplaceMachine(h *mac.HostInformation) error { aN := fmt.Sprintf(amiRegex, r.Version) bdt := blockDeviceType ami, err := data.GetAMI( @@ -98,33 +80,35 @@ func (r *MacRequest) replaceMachine(h *HostInformation) error { } // Run the bootstrap script creating new access credentials for the user -func (r *MacRequest) replaceUserAccess(h *HostInformation) error { +func (r *Request) ReplaceUserAccess(h *mac.HostInformation) error { r.replace = true r.lock = true return r.manageMacMachine(h) } // Release will set the lock as false -func (r *MacRequest) createMacMachine(h *HostInformation) error { +func (r *Request) CreateMacMachine(h *mac.HostInformation) error { r.lock = true return r.manageMacMachine(h) } // this creates the stack for the mac machine -func (r *MacRequest) manageMacMachine(h *HostInformation) error { +func (r *Request) manageMacMachine(h *mac.HostInformation) error { return r.manageMacMachineTargets(h, nil) } // this creates the stack for the mac machine -func (r *MacRequest) manageMacMachineTargets(h *HostInformation, targetURNs []string) error { +func (r *Request) manageMacMachineTargets(h *mac.HostInformation, targetURNs []string) error { r.AvailabilityZone = h.Host.AvailabilityZone r.dedicatedHost = h r.Region = h.Region cs := manager.Stack{ StackName: fmt.Sprintf("%s-%s", - stackMacMachine, *h.ProjectName), + mac.StackMacMachine, *h.ProjectName), ProjectName: *h.ProjectName, - BackedURL: *h.BackedURL, + // Backed url always should be set from request as it is picked from the + // backed url for the dedicated host (pick from the value add as a tag on the dedicated host resoruce) + BackedURL: *h.BackedURL, ProviderCredentials: aws.GetClouProviderCredentials( map[string]string{ aws.CONFIG_AWS_REGION: *h.Region}), @@ -140,18 +124,18 @@ func (r *MacRequest) manageMacMachineTargets(h *HostInformation, targetURNs []st } // this creates the stack for the mac machine -func (r *MacRequest) createAirgapMacMachine(h *HostInformation) error { +func (r *Request) CreateAirgapMacMachine(h *mac.HostInformation) error { r.airgapPhaseConnectivity = network.ON - err := r.createMacMachine(h) + err := r.CreateMacMachine(h) if err != nil { return nil } r.airgapPhaseConnectivity = network.OFF - return r.createMacMachine(h) + return r.CreateMacMachine(h) } // Main function to deploy all requried resources to azure -func (r *MacRequest) deployerMachine(ctx *pulumi.Context) error { +func (r *Request) deployerMachine(ctx *pulumi.Context) error { // Export information ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputRegion), pulumi.String(*r.Region)) ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostID), pulumi.String(*r.dedicatedHost.Host.HostId)) @@ -235,7 +219,7 @@ func (r *MacRequest) deployerMachine(ctx *pulumi.Context) error { } // Write exported values in context to files o a selected target folder -func (r *MacRequest) manageResultsMachine(stackResult auto.UpResult) error { +func (r *Request) manageResultsMachine(stackResult auto.UpResult) error { results := map[string]string{ fmt.Sprintf("%s-%s", r.Prefix, outputUsername): "username", fmt.Sprintf("%s-%s", r.Prefix, outputUserPassword): "userpassword", @@ -254,7 +238,7 @@ func (r *MacRequest) manageResultsMachine(stackResult auto.UpResult) error { } // security group for mac machine with ingress rules for ssh and vnc -func (r *MacRequest) securityGroups(ctx *pulumi.Context, +func (r *Request) securityGroups(ctx *pulumi.Context, vpc *ec2.Vpc) (pulumi.StringArray, error) { // ingress for ssh access from 0.0.0.0 sshIngressRule := securityGroup.SSH_TCP @@ -287,7 +271,7 @@ func (r *MacRequest) securityGroups(ctx *pulumi.Context, } // Create the mac instance -func (r *MacRequest) instance(ctx *pulumi.Context, +func (r *Request) instance(ctx *pulumi.Context, subnet *ec2.Subnet, ami *data.ImageInfo, keyResources *keypair.KeyPairResources, @@ -297,7 +281,7 @@ func (r *MacRequest) instance(ctx *pulumi.Context, HostId: pulumi.String(*r.dedicatedHost.Host.HostId), SubnetId: subnet.ID(), Ami: pulumi.String(*ami.Image.ImageId), - InstanceType: pulumi.String(macTypesByArch[r.Architecture]), + InstanceType: pulumi.String(mac.TypesByArch[r.Architecture]), KeyName: keyResources.AWSKeyPair.KeyName, AssociatePublicIpAddress: pulumi.Bool(true), VpcSecurityGroupIds: securityGroups, @@ -317,7 +301,7 @@ func (r *MacRequest) instance(ctx *pulumi.Context, pulumi.IgnoreChanges([]string{"ami"})) } -func (r *MacRequest) bootstrapscript(ctx *pulumi.Context, +func (r *Request) bootstrapscript(ctx *pulumi.Context, m *ec2.Instance, mk *tls.PrivateKey, b *bastion.Bastion, @@ -348,7 +332,7 @@ func (r *MacRequest) bootstrapscript(ctx *pulumi.Context, // fuction will return the bootstrap script which will be execute on the mac machine // during the start of the machine -func (r *MacRequest) getBootstrapScript(ctx *pulumi.Context) ( +func (r *Request) getBootstrapScript(ctx *pulumi.Context) ( pulumi.StringPtrInput, *random.RandomPassword, *keypair.KeyPairResources, @@ -384,7 +368,7 @@ func (r *MacRequest) getBootstrapScript(ctx *pulumi.Context) ( return postscript, password, ukp, nil } -func (r *MacRequest) readiness(ctx *pulumi.Context, +func (r *Request) readiness(ctx *pulumi.Context, m *ec2.Instance, mk *tls.PrivateKey, b *bastion.Bastion, diff --git a/pkg/provider/aws/action/mac/constants.go b/pkg/provider/aws/modules/mac/machine/types.go similarity index 52% rename from pkg/provider/aws/action/mac/constants.go rename to pkg/provider/aws/modules/mac/machine/types.go index bd525c59c..97cc472e7 100644 --- a/pkg/provider/aws/action/mac/constants.go +++ b/pkg/provider/aws/modules/mac/machine/types.go @@ -1,9 +1,34 @@ -package mac +package machine -const ( - stackDedicatedHost = "stackDedicatedHost" - stackMacMachine = "stackMacMachine" +import ( + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" +) +type Request struct { + // Prefix for the resources related to mac + // this is relevant in case of an orchestration with multiple + // macs on the same stack + Prefix string + Region *string + AvailabilityZone *string + Version string + Architecture string + // setup as github actions runner + SetupGHActionsRunner bool + Airgap bool + // For airgap scenario there is an orchestation of + // a phase with connectivity on the machine (allowing bootstraping) + // a pahase with connectivyt off where the subnet for the target lost the nat gateway + airgapPhaseConnectivity network.Connectivity + // dh linkage + dedicatedHost *mac.HostInformation + // operation control params + replace bool + lock bool +} + +const ( awsMacMachineID = "amm" customResourceTypeLock = "rh:qe:aws:mac:lock" @@ -31,23 +56,9 @@ const ( // https://www.pulumi.com/docs/intro/concepts/resources/options/customtimeouts/ remoteTimeout string = "40m" - - tagKeyBackedURL string = "backedURL" - tagKeyArch string = "arch" ) -var macTypesByArch = map[string]string{ - "x86": "mac1.metal", - "m1": "mac2.metal", - "m2": "mac2-m2pro.metal"} - var awsArchIDbyArch = map[string]string{ "x86": "x86_64_mac", "m1": "arm64_mac", "m2": "arm64_mac"} - -// var macAMIs = map[string]string{ -// "arm64_mac-13": "macos-arm64-13.6.1", -// "arm64_mac-14": "macos-arm64-14.1", -// "x86_64_mac-12": "mac12_x86", -// "x86_64_mac-13": "mac13_x86"} diff --git a/pkg/provider/aws/modules/mac/machine/util.go b/pkg/provider/aws/modules/mac/machine/util.go new file mode 100644 index 000000000..7c7565f97 --- /dev/null +++ b/pkg/provider/aws/modules/mac/machine/util.go @@ -0,0 +1,11 @@ +package machine + +// import ( +// "fmt" + +// "github.com/redhat-developer/mapt/pkg/manager" +// "github.com/redhat-developer/mapt/pkg/provider/aws" +// "github.com/redhat-developer/mapt/pkg/provider/aws/modules/mac" + +// maptContext "github.com/redhat-developer/mapt/pkg/manager/context" +// ) diff --git a/pkg/provider/aws/modules/mac/types.go b/pkg/provider/aws/modules/mac/types.go new file mode 100644 index 000000000..780624811 --- /dev/null +++ b/pkg/provider/aws/modules/mac/types.go @@ -0,0 +1,33 @@ +package mac + +import ( + ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" +) + +const ( + StackDedicatedHost = "stackDedicatedHost" + StackMacMachine = "stackMacMachine" + + outputLock = "ammLock" +) + +type HostInformation struct { + Arch *string + BackedURL *string + ProjectName *string + RunID *string + Region *string + Host *ec2Types.Host +} + +var ( + TypesByArch = map[string]string{ + "x86": "mac1.metal", + "m1": "mac2.metal", + "m2": "mac2-m2pro.metal"} + + AWSArchIDbyArch = map[string]string{ + "x86": "x86_64_mac", + "m1": "arm64_mac", + "m2": "arm64_mac"} +) diff --git a/pkg/provider/aws/modules/mac/util.go b/pkg/provider/aws/modules/mac/util.go new file mode 100644 index 000000000..2533cc7c0 --- /dev/null +++ b/pkg/provider/aws/modules/mac/util.go @@ -0,0 +1,51 @@ +package mac + +import ( + "fmt" + "strings" + + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/util/logging" +) + +// We will get a list of hosts from the pool ordered by allocation time +// We will apply several rules on them to pick the right one +// - TODO Remove those with allocation time > 24 h as they may destroyed +// - if none left use them again +// - if more available pick in order the first without lock +func PickHost(prefix string, his []*HostInformation) (*HostInformation, error) { + for _, h := range his { + isLocked, err := IsMachineLocked(prefix, h) + if err != nil { + logging.Errorf("error checking if machine %s is locked", *h.Host.HostId) + if strings.Contains(err.Error(), "no stack") { + return h, err + } + } + if !isLocked { + return h, nil + } + } + return nil, fmt.Errorf("all hosts are locked at the moment") +} + +func IsMachineLocked(prefix string, h *HostInformation) (bool, error) { + s, err := manager.CheckStack(manager.Stack{ + StackName: maptContext.StackNameByProject(StackMacMachine), + ProjectName: maptContext.ProjectName(), + BackedURL: *h.BackedURL, + ProviderCredentials: aws.GetClouProviderCredentials( + map[string]string{ + aws.CONFIG_AWS_REGION: *h.Region}), + }) + if err != nil { + return false, err + } + outputs, err := manager.GetOutputs(s) + if err != nil { + return false, err + } + return outputs[fmt.Sprintf("%s-%s", prefix, outputLock)].Value.(bool), nil +} diff --git a/pkg/provider/aws/util/credentials/credentials.go b/pkg/provider/aws/util/credentials/credentials.go deleted file mode 100644 index 1f48f098d..000000000 --- a/pkg/provider/aws/util/credentials/credentials.go +++ /dev/null @@ -1,68 +0,0 @@ -package credentials - -import ( - "encoding/json" - "fmt" - "io" - "net/http" - "os" - - "github.com/redhat-developer/mapt/pkg/util/logging" -) - -const ( - metadataBaseURL = "http://169.254.170.2" - ecsCredentialsRelativeURIENV = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" - defaultAWSRegion = "us-east-1" -) - -// https://docs.aws.amazon.com/sdkref/latest/guide/feature-container-credentials.html -func SetCredentialsFromContainerRole() error { - relativeURI := os.Getenv(ecsCredentialsRelativeURIENV) - if relativeURI == "" { - return fmt.Errorf("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI not set. Are you running in an ECS container?") - } - resp, err := http.Get(fmt.Sprintf("%s/%s", metadataBaseURL, relativeURI)) - if err != nil { - return err - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return fmt.Errorf("failed to fetch credentials, status code: %d", resp.StatusCode) - } - // Parse the response - body, err := io.ReadAll(resp.Body) - if err != nil { - return fmt.Errorf("failed to fetch credentials, status code: %d", resp.StatusCode) - - } - var credentials struct { - AccessKeyID string `json:"AccessKeyId"` - SecretAccessKey string `json:"SecretAccessKey"` - SessionToken string `json:"Token"` - Expiration string `json:"Expiration"` - } - err = json.Unmarshal(body, &credentials) - if err != nil { - fmt.Printf("Error parsing JSON: %v\n", err) - os.Exit(1) - } - logging.Debug("We are runnging on serverless mode so we will set the ephemeral Envs for it") - if err := os.Setenv("AWS_ACCESS_KEY_ID", credentials.AccessKeyID); err != nil { - return err - } - if err := os.Setenv("AWS_SECRET_ACCESS_KEY", credentials.SecretAccessKey); err != nil { - return err - } - if err := os.Setenv("AWS_SESSION_TOKEN", credentials.SessionToken); err != nil { - return err - } - if err := os.Setenv("AWS_DEFAULT_REGION", defaultAWSRegion); err != nil { - return err - } - if err := os.Setenv("AWS_REGION", defaultAWSRegion); err != nil { - return err - } - return nil -} diff --git a/tools/go.mod b/tools/go.mod index ced346097..113d2ccfd 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,57 +1,58 @@ module github.com/redhat-developer/mapt/tools -go 1.21 +go 1.22.1 -toolchain go1.22.4 +toolchain go1.23.4 -require github.com/golangci/golangci-lint v1.59.1 +require github.com/golangci/golangci-lint v1.63.4 require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect - github.com/4meepo/tagalign v1.3.4 // indirect - github.com/Abirdcfly/dupword v0.0.14 // indirect - github.com/Antonboom/errname v0.1.13 // indirect - github.com/Antonboom/nilnil v0.1.9 // indirect - github.com/Antonboom/testifylint v1.3.1 // indirect - github.com/BurntSushi/toml v1.4.0 // indirect - github.com/Crocmagnon/fatcontext v0.2.2 // indirect + github.com/4meepo/tagalign v1.4.1 // indirect + github.com/Abirdcfly/dupword v0.1.3 // indirect + github.com/Antonboom/errname v1.0.0 // indirect + github.com/Antonboom/nilnil v1.0.1 // indirect + github.com/Antonboom/testifylint v1.5.2 // indirect + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect + github.com/Crocmagnon/fatcontext v0.5.3 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect - github.com/Masterminds/semver/v3 v3.2.1 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect - github.com/alecthomas/go-check-sumtype v0.1.4 // indirect - github.com/alexkohler/nakedret/v2 v2.0.4 // indirect + github.com/alecthomas/go-check-sumtype v0.3.1 // indirect + github.com/alexkohler/nakedret/v2 v2.0.5 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect + github.com/alingse/nilnesserr v0.1.1 // indirect github.com/ashanbrown/forbidigo v1.6.0 // indirect - github.com/ashanbrown/makezero v1.1.1 // indirect + github.com/ashanbrown/makezero v1.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.1 // indirect + github.com/bkielbasa/cyclop v1.2.3 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v4 v4.2.1 // indirect - github.com/breml/bidichk v0.2.7 // indirect - github.com/breml/errchkjson v0.3.6 // indirect - github.com/butuzov/ireturn v0.3.0 // indirect - github.com/butuzov/mirror v1.2.0 // indirect + github.com/bombsimon/wsl/v4 v4.5.0 // indirect + github.com/breml/bidichk v0.3.2 // indirect + github.com/breml/errchkjson v0.4.0 // indirect + github.com/butuzov/ireturn v0.3.1 // indirect + github.com/butuzov/mirror v1.3.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect - github.com/ckaznocha/intrange v0.1.2 // indirect - github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/daixiang0/gci v0.13.4 // indirect + github.com/ckaznocha/intrange v0.3.0 // indirect + github.com/curioswitch/go-reassign v0.3.0 // indirect + github.com/daixiang0/gci v0.13.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/ettle/strcase v0.2.0 // indirect - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/firefart/nonamedreturns v1.0.5 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/ghostiam/protogetter v0.3.6 // indirect - github.com/go-critic/go-critic v0.11.4 // indirect + github.com/ghostiam/protogetter v0.3.8 // indirect + github.com/go-critic/go-critic v0.11.5 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect github.com/go-toolsmith/astequal v1.2.0 // indirect @@ -59,13 +60,14 @@ require ( github.com/go-toolsmith/astp v1.1.0 // indirect github.com/go-toolsmith/strparse v1.1.0 // indirect github.com/go-toolsmith/typep v1.1.0 // indirect - github.com/go-viper/mapstructure/v2 v2.0.0 // indirect - github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.1 // indirect + github.com/gofrs/flock v0.12.1 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect + github.com/golangci/go-printf-func-name v0.1.0 // indirect + github.com/golangci/gofmt v0.0.0-20241223200906-057b0627d9b9 // indirect github.com/golangci/misspell v0.6.0 // indirect github.com/golangci/modinfo v0.3.4 // indirect github.com/golangci/plugin-module-register v0.1.1 // indirect @@ -77,24 +79,29 @@ require ( github.com/gostaticanalysis/comment v1.4.2 // indirect github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect github.com/gostaticanalysis/nilerr v0.1.1 // indirect + github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect - github.com/jjti/go-spancheck v0.6.1 // indirect - github.com/julz/importas v0.1.0 // indirect + github.com/jjti/go-spancheck v0.6.4 // indirect + github.com/julz/importas v0.2.0 // indirect github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect - github.com/kisielk/errcheck v1.7.0 // indirect + github.com/kisielk/errcheck v1.8.0 // indirect github.com/kkHAIKE/contextcheck v1.1.5 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect - github.com/lasiar/canonicalheader v1.1.1 // indirect - github.com/ldez/gomoddirectives v0.2.4 // indirect - github.com/ldez/tagliatelle v0.5.0 // indirect + github.com/lasiar/canonicalheader v1.1.2 // indirect + github.com/ldez/exptostd v0.3.1 // indirect + github.com/ldez/gomoddirectives v0.6.0 // indirect + github.com/ldez/grignotin v0.7.0 // indirect + github.com/ldez/tagliatelle v0.7.1 // indirect + github.com/ldez/usetesting v0.4.2 // indirect github.com/leonklingele/grouper v1.1.2 // indirect github.com/lufeee/execinquery v1.2.1 // indirect github.com/macabu/inamedparam v0.1.3 // indirect @@ -104,89 +111,93 @@ require ( github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect - github.com/mgechev/revive v1.3.7 // indirect + github.com/mgechev/revive v1.5.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moricho/tparallel v0.3.1 // indirect + github.com/moricho/tparallel v0.3.2 // indirect github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.16.2 // indirect + github.com/nunnatsa/ginkgolinter v0.18.4 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.5.2 // indirect + github.com/polyfloyd/go-errorlint v1.7.0 // indirect github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect - github.com/quasilyte/go-ruleguard v0.4.2 // indirect + github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/ryancurrah/gomodguard v1.3.2 // indirect + github.com/raeperd/recvcheck v0.2.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/ryancurrah/gomodguard v1.3.5 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect - github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect + github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.26.0 // indirect - github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 // indirect + github.com/sashamelentyev/usestdlibvars v1.28.0 // indirect + github.com/securego/gosec/v2 v2.21.4 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/tenv v1.7.1 // indirect - github.com/sonatard/noctx v0.0.2 // indirect + github.com/sivchari/tenv v1.12.1 // indirect + github.com/sonatard/noctx v0.1.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.12.0 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect - github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/stretchr/testify v1.9.0 // indirect + github.com/stretchr/testify v1.10.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect - github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.16 // indirect - github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect - github.com/timonwong/loggercheck v0.9.4 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.3 // indirect + github.com/tdakkota/asciicheck v0.3.0 // indirect + github.com/tetafro/godot v1.4.20 // indirect + github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 // indirect + github.com/timonwong/loggercheck v0.10.1 // indirect + github.com/tomarrell/wrapcheck/v2 v2.10.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ultraware/funlen v0.1.0 // indirect - github.com/ultraware/whitespace v0.1.1 // indirect - github.com/uudashr/gocognit v1.1.2 // indirect + github.com/ultraware/funlen v0.2.0 // indirect + github.com/ultraware/whitespace v0.2.0 // indirect + github.com/uudashr/gocognit v1.2.0 // indirect + github.com/uudashr/iface v1.3.0 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.3.0 // indirect github.com/ykadowak/zerologlint v0.1.5 // indirect gitlab.com/bosi/decorder v0.4.2 // indirect - go-simpler.org/musttag v0.12.2 // indirect - go-simpler.org/sloglint v0.7.1 // indirect + go-simpler.org/musttag v0.13.0 // indirect + go-simpler.org/sloglint v0.7.2 // indirect go.uber.org/atomic v1.7.0 // indirect - go.uber.org/automaxprocs v1.5.3 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect - golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.22.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.20.0 // indirect + golang.org/x/tools v0.28.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.4.7 // indirect - mvdan.cc/gofumpt v0.6.0 // indirect + honnef.co/go/tools v0.5.1 // indirect + mvdan.cc/gofumpt v0.7.0 // indirect mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect ) diff --git a/tools/go.sum b/tools/go.sum index 01ca2d39d..5ed92e6e8 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -37,32 +37,52 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= +github.com/4meepo/tagalign v1.4.1 h1:GYTu2FaPGOGb/xJalcqHeD4il5BiCywyEYZOA55P6J4= +github.com/4meepo/tagalign v1.4.1/go.mod h1:2H9Yu6sZ67hmuraFgfZkNcg5Py9Ch/Om9l2K/2W1qS4= github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= +github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE= +github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw= github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM= github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns= +github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA= +github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI= github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ= github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ= +github.com/Antonboom/nilnil v1.0.1 h1:C3Tkm0KUxgfO4Duk3PM+ztPncTFlOf0b2qadmS0s4xs= +github.com/Antonboom/nilnil v1.0.1/go.mod h1:CH7pW2JsRNFgEh8B2UaPZTEPhCMuFowP/e8Udp9Nnb0= github.com/Antonboom/testifylint v1.3.1 h1:Uam4q1Q+2b6H7gvk9RQFw6jyVDdpzIirFOOrbs14eG4= github.com/Antonboom/testifylint v1.3.1/go.mod h1:NV0hTlteCkViPW9mSR4wEMfwp+Hs1T3dY60bkvSfhpM= +github.com/Antonboom/testifylint v1.5.2 h1:4s3Xhuv5AvdIgbd8wOOEeo0uZG7PbDKQyKY5lGoQazk= +github.com/Antonboom/testifylint v1.5.2/go.mod h1:vxy8VJ0bc6NavlYqjZfmp6EfqXMtBgQ4+mhCojwC1P8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= +github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Crocmagnon/fatcontext v0.2.2 h1:OrFlsDdOj9hW/oBEJBNSuH7QWf+E9WPVHw+x52bXVbk= github.com/Crocmagnon/fatcontext v0.2.2/go.mod h1:WSn/c/+MMNiD8Pri0ahRj0o9jVpeowzavOQplBJw6u0= +github.com/Crocmagnon/fatcontext v0.5.3 h1:zCh/wjc9oyeF+Gmp+V60wetm8ph2tlsxocgg/J0hOps= +github.com/Crocmagnon/fatcontext v0.5.3/go.mod h1:XoCQYY1J+XTfyv74qLXvNw4xFunr3L1wkopIIKG7wGM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c= github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0/go.mod h1:Nl76DrGNJTA1KJ0LePKBw/vznBX1EHbAZX8mwjR82nI= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 h1:/fTUt5vmbkAcMBt4YQiuC23cV0kEsN1MVMNqeOW43cU= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0/go.mod h1:ONJg5sxcbsdQQ4pOW8TGdTidT2TMAUy/2Xhr8mrYaao= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= +github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= +github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -72,14 +92,20 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= +github.com/alexkohler/nakedret/v2 v2.0.5 h1:fP5qLgtwbx9EJE8dGEERT02YwS8En4r9nnZ71RK+EVU= +github.com/alexkohler/nakedret/v2 v2.0.5/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/alingse/nilnesserr v0.1.1 h1:7cYuJewpy9jFNMEA72Q1+3Nm3zKHzg+Q28D5f2bBFUA= +github.com/alingse/nilnesserr v0.1.1/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg= github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= +github.com/ashanbrown/makezero v1.2.0 h1:/2Lp1bypdmK9wDIq7uWBlDF1iMUpIIS4A+pF6C9IEUU= +github.com/ashanbrown/makezero v1.2.0/go.mod h1:dxlPhHbDMC6N6xICzFBSK+4njQDdK8euNO0qjQMtGY4= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -88,18 +114,30 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= +github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bombsimon/wsl/v4 v4.2.1 h1:Cxg6u+XDWff75SIFFmNsqnIOgob+Q9hG6y/ioKbRFiM= github.com/bombsimon/wsl/v4 v4.2.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= +github.com/bombsimon/wsl/v4 v4.5.0 h1:iZRsEvDdyhd2La0FVi5k6tYehpOR/R7qIUjmKk7N74A= +github.com/bombsimon/wsl/v4 v4.5.0/go.mod h1:NOQ3aLF4nD7N5YPXMruR6ZXDOAqLoM0GEpLwTdvmOSc= github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= +github.com/breml/bidichk v0.3.2 h1:xV4flJ9V5xWTqxL+/PMFF6dtJPvZLPsyixAoPe8BGJs= +github.com/breml/bidichk v0.3.2/go.mod h1:VzFLBxuYtT23z5+iVkamXO386OB+/sVwZOpIj6zXGos= github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= +github.com/breml/errchkjson v0.4.0 h1:gftf6uWZMtIa/Is3XJgibewBm2ksAQSY/kABDNFTAdk= +github.com/breml/errchkjson v0.4.0/go.mod h1:AuBOSTHyLSaaAFlWsRSuRBIroCh3eh7ZHh5YeelDIk8= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= +github.com/butuzov/ireturn v0.3.1 h1:mFgbEI6m+9W8oP/oDdfA34dLisRFCj2G6o/yiI1yZrY= +github.com/butuzov/ireturn v0.3.1/go.mod h1:ZfRp+E7eJLC0NQmk1Nrm1LOrn/gQlOykv+cVPdiXH5M= github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= github.com/butuzov/mirror v1.2.0/go.mod h1:DqZZDtzm42wIAIyHXeN8W/qb1EPlb9Qn/if9icBOpdQ= +github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc= +github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= @@ -117,13 +155,20 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9MTI= github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE= +github.com/ckaznocha/intrange v0.3.0 h1:VqnxtK32pxgkhJgYQEeOArVidIPg+ahLP7WBOXZd5ZY= +github.com/ckaznocha/intrange v0.3.0/go.mod h1:+I/o2d2A1FBHgGELbGxzIcyd3/9l9DuwjM8FsbSS3Lo= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= +github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs= +github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88= github.com/daixiang0/gci v0.13.4 h1:61UGkmpoAcxHM2hhNkZEf5SzwQtWJXTSws7jaPyqwlw= github.com/daixiang0/gci v0.13.4/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= +github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c= +github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -137,6 +182,8 @@ github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA= @@ -149,8 +196,12 @@ github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= +github.com/ghostiam/protogetter v0.3.8 h1:LYcXbYvybUyTIxN2Mj9h6rHrDZBDwZloPoKctWrFyJY= +github.com/ghostiam/protogetter v0.3.8/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= +github.com/go-critic/go-critic v0.11.5 h1:TkDTOn5v7EEngMxu8KbuFqFR43USaaH8XRJLz1jhVYA= +github.com/go-critic/go-critic v0.11.5/go.mod h1:wu6U7ny9PiaHaZHcvMDmdysMqvDem162Rh3zWTrqk8M= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -186,12 +237,18 @@ github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUN github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc= github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY= +github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= +github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -224,10 +281,16 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU= +github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= +github.com/golangci/gofmt v0.0.0-20241223200906-057b0627d9b9 h1:t5wybL6RtO83VwoMOb7U/Peqe3gGKQlPIC66wXmnkvM= +github.com/golangci/gofmt v0.0.0-20241223200906-057b0627d9b9/go.mod h1:Ag3L7sh7E28qAp/5xnpMMTuGYqxLZoSaEHZDkZB1RgU= github.com/golangci/golangci-lint v1.59.1 h1:CRRLu1JbhK5avLABFJ/OHVSQ0Ie5c4ulsOId1h3TTks= github.com/golangci/golangci-lint v1.59.1/go.mod h1:jX5Oif4C7P0j9++YB2MMJmoNrb01NJ8ITqKWNLewThg= +github.com/golangci/golangci-lint v1.63.4 h1:bJQFQ3hSfUto597dkL7ipDzOxsGEpiWdLiZ359OWOBI= +github.com/golangci/golangci-lint v1.63.4/go.mod h1:Hx0B7Lg5/NXbaOHem8+KU+ZUIzMI6zNj/7tFwdnn10I= github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA= @@ -283,11 +346,17 @@ github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= @@ -303,6 +372,8 @@ github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9B github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jjti/go-spancheck v0.6.1 h1:ZK/wE5Kyi1VX3PJpUO2oEgeoI4FWOUm7Shb2Gbv5obI= github.com/jjti/go-spancheck v0.6.1/go.mod h1:vF1QkOO159prdo6mHRxak2CpzDpHAfKiPUDP/NeRnX8= +github.com/jjti/go-spancheck v0.6.4 h1:Tl7gQpYf4/TMU7AT84MN83/6PutY21Nb9fuQjFTpRRc= +github.com/jjti/go-spancheck v0.6.4/go.mod h1:yAEYdKJ2lRkDA8g7X+oKUHXOWVAXSBJRv04OhF+QUjk= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -314,10 +385,14 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= +github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym7fCjIP8RPos= github.com/karamaru-alpha/copyloopvar v1.1.0/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= +github.com/kisielk/errcheck v1.8.0 h1:ZX/URYa7ilESY19ik/vBmCn6zdGQLxACwjAcWbHlYlg= +github.com/kisielk/errcheck v1.8.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= @@ -340,10 +415,22 @@ github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/lasiar/canonicalheader v1.1.1 h1:wC+dY9ZfiqiPwAexUApFush/csSPXeIi4QqyxXmng8I= github.com/lasiar/canonicalheader v1.1.1/go.mod h1:cXkb3Dlk6XXy+8MVQnF23CYKWlyA7kfQhSw2CcZtZb0= +github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= +github.com/ldez/exptostd v0.3.1 h1:90yWWoAKMFHeovTK8uzBms9Ppp8Du/xQ20DRO26Ymrw= +github.com/ldez/exptostd v0.3.1/go.mod h1:iZBRYaUmcW5jwCR3KROEZ1KivQQp6PHXbDPk9hqJKCQ= github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= +github.com/ldez/gomoddirectives v0.6.0 h1:Jyf1ZdTeiIB4dd+2n4qw+g4aI9IJ6JyfOZ8BityWvnA= +github.com/ldez/gomoddirectives v0.6.0/go.mod h1:TuwOGYoPAoENDWQpe8DMqEm5nIfjrxZXmxX/CExWyZ4= +github.com/ldez/grignotin v0.7.0 h1:vh0dI32WhHaq6LLPZ38g7WxXuZ1+RzyrJ7iPG9JMa8c= +github.com/ldez/grignotin v0.7.0/go.mod h1:uaVTr0SoZ1KBii33c47O1M8Jp3OP3YDwhZCmzT9GHEk= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= +github.com/ldez/tagliatelle v0.7.1 h1:bTgKjjc2sQcsgPiT902+aadvMjCeMHrY7ly2XKFORIk= +github.com/ldez/tagliatelle v0.7.1/go.mod h1:3zjxUpsNB2aEZScWiZTHrAXOl1x25t3cRmzfK1mlo2I= +github.com/ldez/usetesting v0.4.2 h1:J2WwbrFGk3wx4cZwSMiCQQ00kjGR0+tuuyW0Lqm4lwA= +github.com/ldez/usetesting v0.4.2/go.mod h1:eEs46T3PpQ+9RgN9VjpY6qWdiw2/QmfiDeWmdZdrjIQ= github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= @@ -368,10 +455,14 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= +github.com/mgechev/revive v1.5.1 h1:hE+QPeq0/wIzJwOphdVyUJ82njdd8Khp4fUIHGZHW3M= +github.com/mgechev/revive v1.5.1/go.mod h1:lC9AhkJIBs5zwx8wkudyHrU+IJkrEKmpCmGMnIJPk4o= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -383,6 +474,8 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= +github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= @@ -393,6 +486,8 @@ github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= +github.com/nunnatsa/ginkgolinter v0.18.4 h1:zmX4KUR+6fk/vhUFt8DOP6KwznekhkmVSzzVJve2vyM= +github.com/nunnatsa/ginkgolinter v0.18.4/go.mod h1:AMEane4QQ6JwFz5GgjI5xLUM9S/CylO+UyM97fN2iBI= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU= @@ -410,6 +505,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -418,6 +515,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v1.5.2 h1:SJhVik3Umsjh7mte1vE0fVZ5T1gznasQG3PV7U5xFdA= github.com/polyfloyd/go-errorlint v1.5.2/go.mod h1:sH1QC1pxxi0fFecsVIzBmxtrgd9IF/SkJpA6wqyKAJs= +github.com/polyfloyd/go-errorlint v1.7.0 h1:Zp6lzCK4hpBDj8y8a237YK4EPrMXQWvOe3nGoH4pFrU= +github.com/polyfloyd/go-errorlint v1.7.0/go.mod h1:dGWKu85mGHnegQ2SWpEybFityCg3j7ZbwsVUxAOk9gY= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -444,6 +543,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= +github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 h1:+Wl/0aFp0hpuHM3H//KMft64WQ1yX9LdJY64Qm/gFCo= +github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= @@ -452,26 +553,42 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74UI= +github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.3.2 h1:CuG27ulzEB1Gu5Dk5gP8PFxSOZ3ptSdP5iI/3IXxM18= github.com/ryancurrah/gomodguard v1.3.2/go.mod h1:LqdemiFomEjcxOqirbQCb3JFvSxH2JUYMerTFd3sF2o= +github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV3oJmPU= +github.com/ryancurrah/gomodguard v1.3.5/go.mod h1:MXlEPQRxgfPQa62O8wzK3Ozbkv9Rkqr+wKjSxTdsNJE= github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= +github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.26.0 h1:LONR2hNVKxRmzIrZR0PhSF3mhCAzvnr+DcUiHgREfXE= github.com/sashamelentyev/usestdlibvars v1.26.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= +github.com/sashamelentyev/usestdlibvars v1.28.0 h1:jZnudE2zKCtYlGzLVreNp5pmCdOxXUzwsMDBkR21cyQ= +github.com/sashamelentyev/usestdlibvars v1.28.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 h1:rnO6Zp1YMQwv8AyxzuwsVohljJgp4L0ZqiCgtACsPsc= github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9/go.mod h1:dg7lPlu/xK/Ut9SedURCoZbVCR4yC7fM65DtH9/CDHs= +github.com/securego/gosec/v2 v2.21.4 h1:Le8MSj0PDmOnHJgUATjD96PaXRvCpKC+DGJvwyy0Mlk= +github.com/securego/gosec/v2 v2.21.4/go.mod h1:Jtb/MwRQfRxCXyCm1rfM1BEiiiTfUOdyzzAhlr6lUTA= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= @@ -485,8 +602,12 @@ github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+W github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/sivchari/tenv v1.12.1 h1:+E0QzjktdnExv/wwsnnyk4oqZBUfuh89YMQT1cyuvSY= +github.com/sivchari/tenv v1.12.1/go.mod h1:1LjSOUCc25snIr5n3DtGGrENhX3LuWefcplwVGC24mw= github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sonatard/noctx v0.1.0 h1:JjqOc2WN16ISWAjAk8M5ej0RfExEXtkEyExl2hLW+OM= +github.com/sonatard/noctx v0.1.0/go.mod h1:0RvBxqY8D4j9cTTTWE8ylt2vqj2EPI8fHmrxHdsaZ2c= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= @@ -495,6 +616,8 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -505,6 +628,8 @@ github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YE github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= +github.com/stbenjam/no-sprintf-host-port v0.2.0 h1:i8pxvGrt1+4G0czLr/WnmyH7zbZ8Bg8etvARQ1rpyl4= +github.com/stbenjam/no-sprintf-host-port v0.2.0/go.mod h1:eL0bQ9PasS0hsyTyfTjjG+E80QIyPnBVQbYZyv20Jfk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -521,32 +646,52 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= +github.com/tdakkota/asciicheck v0.3.0 h1:LqDGgZdholxZMaJgpM6b0U9CFIjDCbFdUF00bDnBKOQ= +github.com/tdakkota/asciicheck v0.3.0/go.mod h1:KoJKXuX/Z/lt6XzLo8WMBfQGzak0SrAKZlvRr4tg8Ac= github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0= github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetafro/godot v1.4.20 h1:z/p8Ek55UdNvzt4TFn2zx2KscpW4rWqcnUrdmvWJj7E= +github.com/tetafro/godot v1.4.20/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 h1:y4mJRFlM6fUyPhoXuFg/Yu02fg/nIPFMOY8tOqppoFg= +github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= +github.com/timonwong/loggercheck v0.10.1 h1:uVZYClxQFpw55eh+PIoqM7uAOHMrhVcDoWDery9R8Lg= +github.com/timonwong/loggercheck v0.10.1/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3bRDFASUs= github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= +github.com/tomarrell/wrapcheck/v2 v2.10.0 h1:SzRCryzy4IrAH7bVGG4cK40tNUhmVmMDuJujy4XwYDg= +github.com/tomarrell/wrapcheck/v2 v2.10.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= +github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI= +github.com/ultraware/funlen v0.2.0/go.mod h1:ZE0q4TsJ8T1SQcjmkhN/w+MceuatI6pBFSxxyteHIJA= github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/Gk8VQ= github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= +github.com/ultraware/whitespace v0.2.0 h1:TYowo2m9Nfj1baEQBjuHzvMRbp19i+RCcRYrSWoFa+g= +github.com/ultraware/whitespace v0.2.0/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= +github.com/uudashr/gocognit v1.2.0 h1:3BU9aMr1xbhPlvJLSydKwdLN3tEUUrzPSSM8S4hDYRA= +github.com/uudashr/gocognit v1.2.0/go.mod h1:k/DdKPI6XBZO1q7HgoV2juESI2/Ofj9AcHPZhBBdrTU= +github.com/uudashr/iface v1.3.0 h1:zwPch0fs9tdh9BmL5kcgSpvnObV+yHjO4JjVBl8IA10= +github.com/uudashr/iface v1.3.0/go.mod h1:4QvspiRd3JLPAEXBQ9AiZpLbJlrWWgRChOKDJEuQTdg= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= @@ -568,8 +713,12 @@ go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= +go-simpler.org/musttag v0.13.0 h1:Q/YAW0AHvaoaIbsPj3bvEI5/QFP7w696IMUpnKXQfCE= +go-simpler.org/musttag v0.13.0/go.mod h1:FTzIGeK6OkKlUDVpj0iQUXZLUO1Js9+mvykDQy9C5yM= go-simpler.org/sloglint v0.7.1 h1:qlGLiqHbN5islOxjeLXoPtUdZXb669RW+BDQ+xOSNoU= go-simpler.org/sloglint v0.7.1/go.mod h1:OlaVDRh/FKKd4X4sIMbsz8st97vomydceL146Fthh/c= +go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= +go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -579,6 +728,8 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= @@ -593,6 +744,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -605,10 +758,14 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f h1:WTyX8eCCyfdqiPYkRGm0MqElSfYFH3yR1+rl/mct9sA= +golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -637,8 +794,13 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -677,6 +839,10 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -698,8 +864,12 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -754,14 +924,23 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -772,8 +951,13 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -838,8 +1022,13 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -921,6 +1110,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -949,8 +1140,12 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= +honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I= +honnef.co/go/tools v0.5.1/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= +mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU= +mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U= mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=