This commit is contained in:
		| @@ -39,6 +39,22 @@ func ActionUpload(c *cli.Context) error { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func ActionDelete(c *cli.Context) error { | ||||
| 	clnt := client.Client{ | ||||
| 		BaseURL: c.String("url"), | ||||
| 	} | ||||
| 	for _, arg := range c.Args().Slice() { | ||||
| 		ctx, cancel := context.WithTimeout(c.Context, 5*time.Second) | ||||
| 		defer cancel() | ||||
| 		if err := clnt.Delete(ctx, arg); err != nil { | ||||
| 			fmt.Printf("Error deleting file %s\n", arg) | ||||
| 			fmt.Printf("%s\n", err) | ||||
| 		} | ||||
| 		fmt.Printf("Deleted %s\n", arg) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func ActionLogin(c *cli.Context) error { | ||||
| 	username := c.Args().First() | ||||
| 	if username == "" { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user