Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Small style adjustments to command tests #16

Merged
merged 1 commit into from
Aug 3, 2020
Merged

Conversation

fuskovic
Copy link
Contributor

Revisited these tests to make some minor code style adjustments.

Why?

They were pointed out to me and made sense.

What was changed?

  • Replaced Write with WriteString to get rid of a type-cast.
  • Moved some globals that were only used once into the blocks they're used in.
  • Shorten func name TestSubcmdAliasesInParentCmdHelpOutput to TestCmdHelpOutput.
  • Reduce line length in a few areas.
  • Use new for initializing pointers consistently.

Tests still pass?

Yes

=== RUN   TestSubCmdAliases
=== RUN   TestSubCmdAliases/s
=== RUN   TestSubCmdAliases/sc
=== RUN   TestSubCmdAliases/sub
--- PASS: TestSubCmdAliases (0.00s)
    --- PASS: TestSubCmdAliases/s (0.00s)
    --- PASS: TestSubCmdAliases/sc (0.00s)
    --- PASS: TestSubCmdAliases/sub (0.00s)
=== RUN   TestCmdHelpOutput
=== RUN   TestCmdHelpOutput/TestCmdHelpOutput
--- PASS: TestCmdHelpOutput (0.00s)
    --- PASS: TestCmdHelpOutput/TestCmdHelpOutput (0.00s)
PASS
ok      go.coder.com/cli        0.376s

@fuskovic fuskovic merged commit 42acd40 into master Aug 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants