Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "mousiki", Short: "A command-line pandora client", Long: "A command-line pandora client based off of pianobar", Args: cobra.NoArgs, RunE: func(_ *cobra.Command, _ []string) error { p := api.NewClient() un := viper.GetString("username") pw := viper.GetString("password") if pw == "" { fmt.Print("Password: ") raw, _ := terminal.ReadPassword(int(os.Stdin.Fd())) pw = string(raw) if len(pw) < 8 { return fmt.Errorf("got bad password: %s (hex: %s)", pw, hex.EncodeToString(raw)) } fmt.Println() } if pw == "" { logrus.Fatal("No password provided") } if err := p.LegacyLogin(un, pw); err != nil { return err } player, err := audio.NewBeepFFmpegPipeline() if err != nil { return err } defer func() { _ = player.Close() }() ctx, cancel := context.WithCancel(context.Background()) defer cancel() controller := mousiki.NewStationController(p, player) app := ui.New(ctx, cancel, player, controller) return app.Run() }, }
Functions ¶
func MarkFlagRequired ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.