(inv *serpent.Invocation)
| 375 | } |
| 376 | |
| 377 | func (pf *templateUploadFlags) templateMessage(inv *serpent.Invocation) string { |
| 378 | title := strings.SplitN(pf.message, "\n", 2)[0] |
| 379 | if len(title) > 72 { |
| 380 | cliui.Warn(inv.Stdout, "Template message is longer than 72 characters, it will be displayed as truncated.") |
| 381 | } |
| 382 | if title != pf.message { |
| 383 | cliui.Warn(inv.Stdout, "Template message contains newlines, only the first line will be displayed.") |
| 384 | } |
| 385 | if pf.message != "" { |
| 386 | return pf.message |
| 387 | } |
| 388 | return "Uploaded from the CLI" |
| 389 | } |
| 390 | |
| 391 | func (pf *templateUploadFlags) templateName(inv *serpent.Invocation) (string, error) { |
| 392 | args := inv.Args |
no test coverage detected