Skip to content

Docs for mock data generation give incorrect counts #196

@tomihawk

Description

@tomihawk

The documentation at https://dev.twitch.tv/docs/cli/mock-api-command and https://github.com/twitchdev/twitch-cli/blob/main/docs/mock-api.md states that the twitch mock-api generate command will default to generate 10 users but it seems to default to 1. The first link also says that if you run twitch mock-api start without having generated any data it will generate the default 10, but it seems to generate 25 users.

The 25 users seems to come from

err := generate.Generate(25)
or
err := generate.Generate(25)

I'm guessing the 1 comes from the &count variable being referenced at

generateCmd.Flags().IntVarP(&count, "count", "c", 10, "Defines the number of fake users to generate.")
is not defined anywhere. I'm not a Go programmer so I'm not sure why the compiler would let you reference the memory address of an undefined variable but specifying a number with -c works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationmock-apiRelates to the `mock-api` feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions