func doBundle(ctx *cli.Context) { if readFromStdin() { entries, _ := ioutil.ReadAll(os.Stdin) antibody.New( bundle.Parse(string(entries), antibody.Home()), ).Download() } else { antibody.New( []bundle.Bundle{bundle.New(ctx.Args().First(), antibody.Home())}, ).Download() } }
func TestParseWithEmptyLines(t *testing.T) { home := internal.TempHome() defer os.RemoveAll(home) s := "caarlos0/zsh-pg\n\n \ncaarlos0/zsh-open-pr" assert.Len(t, bundle.Parse(s, home), 2) }