Skip to content

Commit 88a6f18

Browse files
vishwas-sharma2480JiriCtvrtkaademidoff
authored
Enable revive (#2773)
* resolved conflict and made changes again * formated the changes * corrected the make format error ./agent/agents/mysql/slowlog/slowlog.go:723:30: missing ',' in argument list * corrected the make format error ./agent/agents/mysql/slowlog/slowlog.go:723:30: missing ',' in argument list * resolved the remaining linter warnings * made the requested changes * made changes to cleare main check * made changes to cleare main check * formatted the changes * made changes to cleare main check * formatted the changes * Remove unused lint. * Another changes. * make gen * Another lint. * Another lint. * Another lint. * Lint. * Lint godot. * Update managed/services/agents/versioner.go Co-authored-by: Alex Demidoff <[email protected]> --------- Co-authored-by: Jiří Čtvrtka <[email protected]> Co-authored-by: Jiří Čtvrtka <[email protected]> Co-authored-by: Alex Demidoff <[email protected]>
1 parent 64ff314 commit 88a6f18

File tree

165 files changed

+4190
-178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+4190
-178
lines changed

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ linters:
116116
# TODO: carefully review all the rules below and either fix the code
117117
# or leave disabled and provide a reason why
118118
#- tagliatelle
119-
- revive
119+
#- revive
120120
- paralleltest
121121
- gocognit
122122
- tagalign

admin/agentlocal/agentlocal.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ func SetTransport(ctx context.Context, debug bool, port uint32) {
4646
client.Default.SetTransport(transport)
4747
}
4848

49+
// NetworkInfo represents information about the network.
4950
type NetworkInfo bool
5051

5152
const (
52-
RequestNetworkInfo NetworkInfo = true
53-
DoNotRequestNetworkInfo NetworkInfo = false
54-
Localhost = "127.0.0.1"
55-
DefaultPMMAgentListenPort = 7777
53+
RequestNetworkInfo NetworkInfo = true //nolint:revive
54+
DoNotRequestNetworkInfo NetworkInfo = false //nolint:revive
55+
Localhost = "127.0.0.1" //nolint:revive
56+
DefaultPMMAgentListenPort = 7777 //nolint:revive
5657
)
5758

5859
// ErrNotSetUp is returned by GetStatus when pmm-agent is running, but not set up.
@@ -81,6 +82,7 @@ type Status struct {
8182
ConnectionUptime float32 `json:"connection_uptime"`
8283
}
8384

85+
// AgentStatus represents the status of the agent.
8486
type AgentStatus struct {
8587
AgentID string `json:"agent_id"`
8688
AgentType string `json:"agent_type"`

admin/cli/cli.go

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func (c *PMMAdminCommands) Run(ctx *kong.Context, globals *flags.GlobalFlags) er
6868
return run(ctx, globals)
6969
}
7070

71+
// GetGlobalFlags returns the global flags for PMMAdminCommands.
7172
func (c *PMMAdminCommands) GetGlobalFlags() *flags.GlobalFlags {
7273
return &c.GlobalFlags
7374
}
@@ -81,6 +82,7 @@ type PMMCommands struct {
8182
Completion commands.CompletionCommand `cmd:"" help:"Outputs shell code for initialising tab completions"`
8283
}
8384

85+
// GetGlobalFlags returns the global flags for PMMAdminCommands.
8486
func (c *PMMCommands) GetGlobalFlags() *flags.GlobalFlags {
8587
return &c.GlobalFlags
8688
}

admin/cmd/pmm-admin/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
14+
// Package main.
1515
package main
1616

1717
import (

admin/cmd/pmm/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
14+
// Package main.
1515
package main
1616

1717
import (

admin/commands/base.go

+4
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,19 @@ func ReadFromSource(src string) (*Credentials, error) {
111111
return &creds, nil
112112
}
113113

114+
// ErrorResponse defines the interface for error responses.
114115
type ErrorResponse interface {
115116
error
116117
Code() int
117118
}
118119

120+
// Error represents an error with additional information.
119121
type Error struct {
120122
Code int `json:"code"`
121123
Error string `json:"error"`
122124
}
123125

126+
// GetError converts an ErrorResponse to an Error.
124127
func GetError(err ErrorResponse) Error {
125128
v := reflect.ValueOf(err)
126129
p := v.Elem().FieldByName("Payload")
@@ -131,6 +134,7 @@ func GetError(err ErrorResponse) Error {
131134
}
132135
}
133136

137+
// ParseTemplate parses the input text into a template.Template.
134138
func ParseTemplate(text string) *template.Template {
135139
t := template.New("").Option("missingkey=error")
136140
return template.Must(t.Parse(strings.TrimSpace(text)))

admin/commands/inventory/add_agent_external_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type AddAgentExternalExporterCommand struct {
6060
PushMetrics bool `help:"Enables push metrics model flow, it will be sent to the server by an agent"`
6161
}
6262

63+
// RunCmd executes the AddAgentExternalExporterCommand and returns the result.
6364
func (cmd *AddAgentExternalExporterCommand) RunCmd() (commands.Result, error) {
6465
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6566

admin/commands/inventory/add_agent_mongodb_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ type AddAgentMongodbExporterCommand struct {
6969
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
7070
}
7171

72+
// RunCmd executes the AddAgentMongodbExporterCommand and returns the result.
7273
func (cmd *AddAgentMongodbExporterCommand) RunCmd() (commands.Result, error) {
7374
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
7475

admin/commands/inventory/add_agent_mysqld_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ type AddAgentMysqldExporterCommand struct {
101101
LogLevel string `enum:"debug,info,warn,error" default:"warn" help:"Service logging level. One of: [debug, info, warn, error]"`
102102
}
103103

104+
// RunCmd executes the AddAgentMysqldExporterCommand and returns the result.
104105
func (cmd *AddAgentMysqldExporterCommand) RunCmd() (commands.Result, error) {
105106
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
106107

admin/commands/inventory/add_agent_node_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type AddAgentNodeExporterCommand struct {
5151
LogLevel string `enum:"debug,info,warn,error" default:"warn" help:"Service logging level. One of: [debug, info, warn, error]"`
5252
}
5353

54+
// RunCmd runs the command for AddAgentNodeExporterCommand.
5455
func (cmd *AddAgentNodeExporterCommand) RunCmd() (commands.Result, error) {
5556
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
5657
params := &agents.AddNodeExporterParams{

admin/commands/inventory/add_agent_pmm_agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ type AddPMMAgentCommand struct {
4444
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
4545
}
4646

47+
// RunCmd executes the AddPMMAgentCommand and returns the result.
4748
func (cmd *AddPMMAgentCommand) RunCmd() (commands.Result, error) {
4849
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
4950
params := &agents.AddPMMAgentParams{

admin/commands/inventory/add_agent_postgres_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ type AddAgentPostgresExporterCommand struct {
6868
AutoDiscoveryLimit int32 `default:"0" placeholder:"NUMBER" help:"Auto-discovery will be disabled if there are more than that number of databases (default: server-defined, -1: always disabled)"`
6969
}
7070

71+
// RunCmd executes the AddAgentPostgresExporterCommand and returns the result.
7172
func (cmd *AddAgentPostgresExporterCommand) RunCmd() (commands.Result, error) {
7273
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
7374

admin/commands/inventory/add_agent_proxysql_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ type AddAgentProxysqlExporterCommand struct {
6262
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
6363
}
6464

65+
// RunCmd executes the AddAgentProxysqlExporterCommand and returns the result.
6566
func (cmd *AddAgentProxysqlExporterCommand) RunCmd() (commands.Result, error) {
6667
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6768
params := &agents.AddProxySQLExporterParams{

admin/commands/inventory/add_agent_qan_mongodb_profiler_agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ type AddAgentQANMongoDBProfilerAgentCommand struct {
6565
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
6666
}
6767

68+
// RunCmd executes the AddAgentQANMongoDBProfilerAgentCommand and returns the result.
6869
func (cmd *AddAgentQANMongoDBProfilerAgentCommand) RunCmd() (commands.Result, error) {
6970
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
7071

admin/commands/inventory/add_agent_qan_mysql_perfschema_agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ type AddAgentQANMySQLPerfSchemaAgentCommand struct {
7171
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
7272
}
7373

74+
// RunCmd runs the command for AddAgentQANMySQLPerfSchemaAgentCommand.
7475
func (cmd *AddAgentQANMySQLPerfSchemaAgentCommand) RunCmd() (commands.Result, error) {
7576
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
7677

admin/commands/inventory/add_agent_qan_mysql_slowlog_agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ type AddAgentQANMySQLSlowlogAgentCommand struct {
8484
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
8585
}
8686

87+
// RunCmd executes the AddAgentQANMySQLSlowlogAgentCommand and returns the result.
8788
func (cmd *AddAgentQANMySQLSlowlogAgentCommand) RunCmd() (commands.Result, error) {
8889
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
8990

admin/commands/inventory/add_agent_qan_postgres_pgstatements_agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ type AddAgentQANPostgreSQLPgStatementsAgentCommand struct {
6262
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
6363
}
6464

65+
// RunCmd executes the AddAgentQANPostgreSQLPgStatementsAgentCommand and returns the result.
6566
func (cmd *AddAgentQANPostgreSQLPgStatementsAgentCommand) RunCmd() (commands.Result, error) {
6667
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6768

admin/commands/inventory/add_agent_qan_postgres_pgstatmonitor_agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ type AddAgentQANPostgreSQLPgStatMonitorAgentCommand struct {
6464
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
6565
}
6666

67+
// RunCmd runs the command for AddAgentQANPostgreSQLPgStatMonitorAgentCommand.
6768
func (cmd *AddAgentQANPostgreSQLPgStatMonitorAgentCommand) RunCmd() (commands.Result, error) {
6869
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6970

admin/commands/inventory/add_agent_rds_exporter.go

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type AddAgentRDSExporterCommand struct {
5858
LogLevel string `enum:"debug,info,warn,error,fatal" default:"warn" help:"Service logging level. One of: [debug, info, warn, error, fatal]"`
5959
}
6060

61+
// RunCmd executes the AddAgentRDSExporterCommand and returns the result.
6162
func (cmd *AddAgentRDSExporterCommand) RunCmd() (commands.Result, error) {
6263
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6364
params := &agents.AddRDSExporterParams{

admin/commands/inventory/add_node_container.go

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type AddNodeContainerCommand struct {
5858
NodeModel string `help:"Node model"`
5959
}
6060

61+
// RunCmd executes the AddNodeContainerCommand and returns the result.
6162
func (cmd *AddNodeContainerCommand) RunCmd() (commands.Result, error) {
6263
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6364
params := &nodes.AddContainerNodeParams{

admin/commands/inventory/add_node_generic.go

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ type AddNodeGenericCommand struct {
5757
NodeModel string `help:"Node mddel"`
5858
}
5959

60+
// RunCmd executes the AddNodeGenericCommand and returns the result.
6061
func (cmd *AddNodeGenericCommand) RunCmd() (commands.Result, error) {
6162
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6263
params := &nodes.AddGenericNodeParams{

admin/commands/inventory/add_node_remote.go

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type AddNodeRemoteCommand struct {
5151
Az string `help:"Node availability zone"`
5252
}
5353

54+
// RunCmd executes the AddNodeRemoteCommand and returns the result.
5455
func (cmd *AddNodeRemoteCommand) RunCmd() (commands.Result, error) {
5556
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
5657
params := &nodes.AddRemoteNodeParams{

admin/commands/inventory/add_node_remote_rds.go

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ type AddNodeRemoteRDSCommand struct {
5353
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
5454
}
5555

56+
// RunCmd executes the AddNodeRemoteRDSCommand and returns the result.
5657
func (cmd *AddNodeRemoteRDSCommand) RunCmd() (commands.Result, error) {
5758
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
5859
params := &nodes.AddRemoteRDSNodeParams{

admin/commands/inventory/add_service_external.go

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ type AddServiceExternalCommand struct {
5353
Group string `help:"Group name of external service"`
5454
}
5555

56+
// RunCmd executes the AddServiceExternalCommand and returns the result.
5657
func (cmd *AddServiceExternalCommand) RunCmd() (commands.Result, error) {
5758
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
5859

admin/commands/inventory/add_service_haproxy.go

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type AddServiceHAProxyCommand struct {
5252
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
5353
}
5454

55+
// RunCmd executes the AddServiceHAProxyCommand and returns the result.
5556
func (cmd *AddServiceHAProxyCommand) RunCmd() (commands.Result, error) {
5657
isSupported, err := helpers.IsHAProxySupported()
5758
if !isSupported {

admin/commands/inventory/add_service_mongodb.go

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type AddServiceMongoDBCommand struct {
6060
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
6161
}
6262

63+
// RunCmd executes the AddServiceMongoDBCommand and returns the result.
6364
func (cmd *AddServiceMongoDBCommand) RunCmd() (commands.Result, error) {
6465
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6566
params := &services.AddMongoDBServiceParams{

admin/commands/inventory/add_service_mysql.go

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type AddServiceMySQLCommand struct {
6060
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
6161
}
6262

63+
// RunCmd runs the command for AddServiceMySQLCommand.
6364
func (cmd *AddServiceMySQLCommand) RunCmd() (commands.Result, error) {
6465
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6566
params := &services.AddMySQLServiceParams{

admin/commands/inventory/add_service_postgresql.go

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type AddServicePostgreSQLCommand struct {
6060
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
6161
}
6262

63+
// RunCmd executes the AddServicePostgreSQLCommand and returns the result.
6364
func (cmd *AddServicePostgreSQLCommand) RunCmd() (commands.Result, error) {
6465
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6566

admin/commands/inventory/add_service_proxysql.go

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ type AddServiceProxySQLCommand struct {
6060
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
6161
}
6262

63+
// RunCmd executes the AddServiceProxySQLCommand and returns the result.
6364
func (cmd *AddServiceProxySQLCommand) RunCmd() (commands.Result, error) {
6465
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
6566
params := &services.AddProxySQLServiceParams{

admin/commands/inventory/inventory.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
// InventoryCommand is used by Kong for CLI flags and commands.
25-
type InventoryCommand struct {
25+
type InventoryCommand struct { //nolint:revive
2626
List ListCommand `cmd:"" help:"List inventory commands"`
2727
Add AddCommand `cmd:"" help:"Add to inventory commands"`
2828
Remove RemoveCommand `cmd:"" help:"Remove from inventory commands"`

admin/commands/inventory/list_agents.go

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ type ListAgentsCommand struct {
101101
AgentType string `help:"Filter by Agent type"`
102102
}
103103

104+
// RunCmd executes the ListAgentsCommand and returns the result.
104105
func (cmd *ListAgentsCommand) RunCmd() (commands.Result, error) {
105106
agentType, err := formatTypeValue(acceptableAgentTypes, cmd.AgentType)
106107
if err != nil {

admin/commands/inventory/list_nodes.go

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ type ListNodesCommand struct {
6363
NodeType string `help:"Filter by Node type"`
6464
}
6565

66+
// RunCmd executes the ListNodesCommand and returns the result.
6667
func (cmd *ListNodesCommand) RunCmd() (commands.Result, error) {
6768
nodeType, err := formatTypeValue(acceptableNodeTypes, cmd.NodeType)
6869
if err != nil {

admin/commands/inventory/list_services.go

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ type ListServicesCommand struct {
7878
ExternalGroup string `help:"Filter by external group"`
7979
}
8080

81+
// RunCmd executes the ListServicesCommand and returns the result.
8182
func (cmd *ListServicesCommand) RunCmd() (commands.Result, error) {
8283
serviceType, err := formatTypeValue(acceptableServiceTypes, cmd.ServiceType)
8384
if err != nil {

admin/commands/inventory/remove_agent.go

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type RemoveAgentCommand struct {
3838
Force bool `help:"Remove agent with all dependencies"`
3939
}
4040

41+
// RunCmd executes the RemoveAgentCommand and returns the result.
4142
func (cmd *RemoveAgentCommand) RunCmd() (commands.Result, error) {
4243
params := &agents.RemoveAgentParams{
4344
Body: agents.RemoveAgentBody{

admin/commands/inventory/remove_node.go

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type RemoveNodeCommand struct {
3838
Force bool `help:"Remove node with all dependencies"`
3939
}
4040

41+
// RunCmd runs the command for RemoveNodeCommand.
4142
func (cmd *RemoveNodeCommand) RunCmd() (commands.Result, error) {
4243
params := &nodes.RemoveNodeParams{
4344
Body: nodes.RemoveNodeBody{

admin/commands/inventory/remove_service.go

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type RemoveServiceCommand struct {
3838
Force bool `help:"Remove service with all dependencies"`
3939
}
4040

41+
// RunCmd executes the RemoveServiceCommand and returns the result.
4142
func (cmd *RemoveServiceCommand) RunCmd() (commands.Result, error) {
4243
params := &services.RemoveServiceParams{
4344
Body: services.RemoveServiceBody{

admin/commands/list.go

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ type ListCommand struct {
123123
NodeID string `help:"Node ID (default is autodetected)"`
124124
}
125125

126+
// RunCmd executes the List command and returns the result.
126127
func (cmd *ListCommand) RunCmd() (Result, error) {
127128
if cmd.NodeID == "" {
128129
status, err := agentlocal.GetStatus(agentlocal.DoNotRequestNetworkInfo)

admin/commands/management/add_external.go

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ type AddExternalCommand struct {
7373
SkipConnectionCheck bool `help:"Skip exporter connection checks"`
7474
}
7575

76+
// GetCredentials returns the credentials for AddExternalCommand.
7677
func (cmd *AddExternalCommand) GetCredentials() error {
7778
creds, err := commands.ReadFromSource(cmd.CredentialsSource)
7879
if err != nil {
@@ -85,6 +86,7 @@ func (cmd *AddExternalCommand) GetCredentials() error {
8586
return nil
8687
}
8788

89+
// RunCmd runs the command for AddExternalCommand.
8890
func (cmd *AddExternalCommand) RunCmd() (commands.Result, error) {
8991
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
9092

admin/commands/management/add_external_serverless.go

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ or even you can specify --address instead of host and port as individual paramet
8888
`
8989
}
9090

91+
// GetCredentials returns the credentials for AddExternalServerlessCommand.
9192
func (cmd *AddExternalServerlessCommand) GetCredentials() error {
9293
creds, err := commands.ReadFromSource(cmd.CredentialsSource)
9394
if err != nil {
@@ -100,6 +101,7 @@ func (cmd *AddExternalServerlessCommand) GetCredentials() error {
100101
return nil
101102
}
102103

104+
// RunCmd runs the command for AddExternalServerlessCommand.
103105
func (cmd *AddExternalServerlessCommand) RunCmd() (commands.Result, error) {
104106
customLabels := commands.ParseCustomLabels(cmd.CustomLabels)
105107

admin/commands/management/add_haproxy.go

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ type AddHAProxyCommand struct {
6363
SkipConnectionCheck bool `help:"Skip connection check"`
6464
}
6565

66+
// GetCredentials returns the credentials for AddHAProxyCommand.
6667
func (cmd *AddHAProxyCommand) GetCredentials() error {
6768
creds, err := commands.ReadFromSource(cmd.CredentialsSource)
6869
if err != nil {
@@ -75,6 +76,7 @@ func (cmd *AddHAProxyCommand) GetCredentials() error {
7576
return nil
7677
}
7778

79+
// RunCmd runs the command for AddHAProxyCommand.
7880
func (cmd *AddHAProxyCommand) RunCmd() (commands.Result, error) {
7981
isSupported, err := helpers.IsHAProxySupported()
8082
if !isSupported {

0 commit comments

Comments
 (0)