Skip to content

Conversation

@Bostigger
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@Aeswolf Aeswolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little concern from me.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Aug 8, 2023
Copy link
Collaborator

@Aeswolf Aeswolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reducing redundancy


// Validate the command.
if dockerCmd.Command == "" {
errorMsg = "Docker command cannot be empty"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace the errorMsg and the code here with the writeError method?

// Create a new Parser
p, err := parser.New(dockerCmd.Command)
if err != nil {
errorMsg = fmt.Sprintf("Error creating parser: %v", err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace the errorMsg and code with the writeError method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants