Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var QuotaCmd = &cobra.Command{ Use: "quota", Short: `Get the quota for the pikpak cloud`, Run: func(cmd *cobra.Command, args []string) { p := pikpak.NewPikPak(conf.Config.Username, conf.Config.Password) err := p.Login() if err != nil { logrus.Errorln("Login Failed:", err) } q, err := p.GetQuota() if err != nil { logrus.Errorln("get cloud quota error:", err) return } fmt.Printf("%-20s%-20s\n", "total", "used") switch human { case true: fmt.Printf("%-20s%-20s\n", displayStorage(q.Limit), displayStorage(q.Usage)) case false: fmt.Printf("%-20s%-20s\n", q.Limit, q.Usage) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.