// Slice with functions to override default command behavior.
// Functions can be added from the `init()` function in manually curated files in this directory.
varpublishOverrides[]func(
*cobra.Command,
*dashboards.PublishRequest,
)
funcnewPublish()*cobra.Command{
cmd:=&cobra.Command{}
varpublishReqdashboards.PublishRequest
varpublishJsonflags.JsonFlag
// TODO: short flags
cmd.Flags().Var(&publishJson,"json",`either inline JSON string or @path/to/file.json with request body`)
cmd.Flags().BoolVar(&publishReq.EmbedCredentials,"embed-credentials",publishReq.EmbedCredentials,`Flag to indicate if the publisher's credentials should be embedded in the published dashboard.`)
cmd.Flags().StringVar(&publishReq.WarehouseId,"warehouse-id",publishReq.WarehouseId,`The ID of the warehouse that can be used to override the warehouse which was set in the draft.`)