Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "populate-post", Usage: "Populate post with random comments", Flags: []cli.Flag{ &cli.Int64Flag{ Name: "num-comments", Usage: "No of comments", Value: 100, Required: true, }, &cli.StringFlag{ Name: "user", Usage: "Username", Required: true, }, }, Action: func(ctx *cli.Context) error { db := ctx.Context.Value("db").(*sql.DB) post := ctx.Args().First() username := ctx.String("user") numComments := ctx.Int("num-comments") populatePost(db, post, username, numComments, false) return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.