Skip to content

Option -h doesn't respect comment newlines. #358

Description

@Nifty255

Given the following target (imported into main magefile):

// Start creates and starts a new MongoDB container using the specified params.
// With the exception of name, all params can use defaults by using "-" for each.
// Params:
// - name         required
// - version      optional  default 4.4
// - network      optional  default no network
// - hostPort     optional  default 27017
// - replicatSet  optional  default no rs
// - templateFile optional  default no template restored
func Start(name, version, network, hostPort, replicaSet, templateFile string) error {

The following is the output of -h:

$ mage -h mongo:start
Start creates and starts a new MongoDB container using the specified params. With the exception of name, all params can use defaults by using "-" for each. Params: - name         required - version      optional  default 4.4 - network      optional  default no network - hostPort     optional  default 27017 - replicaSet   optional  default no rs - templateFile optional  default no template restored

Usage:

        mage mongo:start <name> <version> <network> <hostPort> <replicaSet> <templateFile>

Expected behavior would be to print the comments with their newlines as written in the comments describing the imported target, like so:

$ mage -h mongo:start
Start creates and starts a new MongoDB container using the specified params.
With the exception of name, all params can use defaults by using "-" for each.
Params:
- name         required
- version      optional  default 4.4
- network      optional  default no network
- hostPort     optional  default 27017
- replicaSet   optional  default no rs
- templateFile optional  default no template restored

Usage:

        mage mongo:start <name> <version> <network> <hostPort> <replicaSet> <templateFile>

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions