You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: quota.go
    path of file: ./repos/juicefs/cmd
    
    the code of the file until where you have to start completion: /*
 * JuiceFS, Copyright 2023 Juicedata, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the
    
func quota(c *cli.Context) error {
	setup(c, 1)
	var cmd uint8
	switch c.Command.Name {
	case "set":
		cmd = meta.QuotaSet
	case "get":
		cmd = meta.QuotaGet
	case "delete":
		cmd = meta.QuotaDel
	case "list":
		cmd = meta.QuotaList
	case "check":
		cmd = meta.QuotaCheck
	default:
		logger.Fatalf("Invalid quota command: %s", c.Command.Name)
	}
	dpath := c.String("path")
	if dpath == "" && cmd != meta.QuotaList {
		logger.Fatalf("Please specify the directory with `--path <dir>` option")
	}
	removePassword(c.Args().Get(0))

	m := meta.NewClient(c.Args().Get(0), nil)
	_, err := m.Load(true)
	if err != nil {
		logger.Fatalf("Load setting: %s", err)
	}
	qs := make(map[string]*meta.Quota)
	var strict, repair bool
	if cmd == meta.QuotaSet {
		strict = c.Bool("strict")
		q := &meta.Quota{MaxSpace: -1, MaxInodes: -1} // negative means no change
		if c.IsSet("capacity") {
			q.MaxSpace = int64(c.Uint64("capacity")) << 30
		}
		if c.IsSet("inodes") {
			q.MaxInodes = int64(c.Uint64("inodes"))
		}
		qs[dpath] = q
	}
	if cmd == meta.QuotaCheck {
		strict = c.Bool("strict")
		repair = c.Bool("repair")
	}
	if err := m.HandleQuota(meta.Background, cmd, dpath, qs, strict, repair); err != nil {
		return err
	} else if len(qs) == 0 {
		return nil
	}

	result := make([][]string, 1, len(qs)+1)
	result[0] = []string{"Path", "Size", "Used", "Use%", "Inodes", "IUsed", "IUse%"}
	paths := make([]string, 0, len(qs))
	for p := range qs {
		paths = append(paths, p)
	}
	sort.Strings(paths)
	for _, p := range paths {
		q := qs[p]
		if q.UsedSpace < 0 {
			logger.Warnf("Used space of %s is negative (%d), please run `juicefs quota check` to fix it", p, q.UsedSpace)
			q.UsedSpace = 0
		}
		if q.UsedInodes < 0 {
			logger.Warnf("Used inodes of %s is negative (%d), please run `juicefs quota check` to fix it", p, q.UsedInodes)
			q.UsedInodes = 0
		}
		used := humanize.IBytes(uint64(q.UsedSpace))
		var size, usedR string
		if q.MaxSpace > 0 {
			size = humanize.IBytes(uint64(q.MaxSpace))
			usedR = fmt.Sprintf("%d%%", q.UsedSpace*100/q.MaxSpace)
		} else {
			size = "unlimited"
		}
		iused := humanize.Comma(q.UsedInodes)
		var itotal, iusedR string
		if q.MaxInodes > 0 {
			itotal = humanize.Comma(q.MaxInodes)
			iusedR = fmt.Sprintf("%d%%", q.UsedInodes*100/q.MaxInodes)
		} else {
			itotal = "unlimited"
		}
		result = append(result, []string{p, size, used, usedR, itotal, iused, iusedR})
	}
	printResult(result, 0, false)
	return nil
}