(out io.Writer, paths []string, label, file string)
| 333 | } |
| 334 | |
| 335 | func workspaceListPaths(out io.Writer, paths []string, label, file string) error { |
| 336 | fmt.Fprintf(out, "Paths in %s (%s):\n", label, file) |
| 337 | if len(paths) == 0 { |
| 338 | fmt.Fprintln(out, " (none)") |
| 339 | return nil |
| 340 | } |
| 341 | for idx, p := range paths { |
| 342 | fmt.Fprintf(out, " %d. %s\n", idx+1, p) |
| 343 | } |
| 344 | return nil |
| 345 | } |
| 346 | |
| 347 | func workspaceAddPath(ctx *snap.Context, doc *workspaceDocument, listKind workspaceList, rawPath, workspaceFile string) error { |
| 348 | pathValue := strings.TrimSpace(rawPath) |